I created folders in TortoiseSVN's repo browser. Then I copied all files in it. Then I wanted to delete all files from previous folders. But I couldn't because those files were already locked by someone else.
I want to completely undo the changes I made today and commit those changes and start working fresh. I tried using update to version but it only updates the working copy and does not commit it because no changes are made.
How can I completely undo changes made in TortoiseSVN and commit latest file
You need to perform a reverse merge of the changes and commit that. Then copy your "latest" version in and commit that.
Related
I am currently doing an end of year project and we're using GitLab. This is the first time I am using this and was confident about it until the following problem occurred.
After creating the clone, I've been working on my project and committed quite a few files to the school server by using git push after doing the prerequisites of git add and etc.
Now, I've decided to completely start again. I deleted everything manually from GitLab and then all the files from within the folder where the clone directs to. I started working on my new work in a separate folder - while still working on my new file, I decided to move all the files to the previous file where I deleted everything, where the clone was originally set for GitLab to save my files within the schools server.
When typing git status, the following appears (Please excuse the picture instead of me inserting the code in here. I tried entering the output on the console in here but was having editing problems).
I don't understand how to fully delete everything. So, I want to get rid of all Changes to be committed: and Untracked files:.
If you want to push there nothing to do with git status . git status only shows what been added to your repository before commit.
I am building a theme for NodeBB and the theme lives inside the node_modules directory. Pulling in from master last night I have a new .gitignore my file had ignore all node_modules except for my theme, well since this is a new .gitignore it didn't track my changes.
Then I made changes to my theme without it being tracked. I decided to merge with my repo, after some conflicts took a step back then did npm prune now this pruned my theme, I spent the last hour making changes that I am not sure I can get back.
My question is since the folder was not being tracked is it possible to undo the npm prune and recover the theme within node_modules?
Sadly, I think you won't be able to get your files back.
If you added the files or the directories to .gitignore, then git wasn't tracking them. So you cannot get them back with git, unless you used to have them in the repo, but even if you did, the latest changes that you lost would not be part of the repo. Sorry for the negative answer.
However, all is probably not lost right now. If you immediately unmounted the file system or remounted it read-only as soon as you realised you deleted your theme, you could always try a file recovery tool such as photorec.
I copied a solution from the repository and pasted in a different location. There I created a local repository. Now, it's time to commit back all my changes to the central repository.
The easiest way would be to copy the solution to the folder that is being tracked by SVN, so that when I commit, that solution will be committed also to the repository. However, I don't think the history of all the changes will be committed back.
So how to commit the solution along with the changes history?
I am wondering what happens in SVN when a file is updated directly instead of using SVN? The main reason I am asking is that there was a problem updating the SVN on my machine (windows) when the server (linux) had 2 names that were the same, but different case. I resolved this on the server, but didn't do it through SVN since it won't update correct, but I still get the issue. Do I need to run some kind of command to update it?
Thanks.
EDIT:
I deleted the comflicting file in the working direcotry and wanted to know if doing things directory in the working directory get tracked at all or what needs to be done to resync.
When SVN gets blocked because the repository is more "up to date" than the local checkout, one brain dead foolproof solution is:
Move (or remove) the files that are causing the conflict at the command line (don't use SVN tools to do this, and don't use the GUI if you have tortoise installed).
svn update the repository, which will restore the current copy of the files from the subversion server.
Decide what to do with your cached copies of the old files. Either manually merge them back into the repository, discard them, or remake the changes in the new svn managed files (depending on your needs).
Note that if you move the files into a directory using tortoise, make sure that you move it into a directory that's not associated with ANY SVN project. It's not fun trying to undo the helpful changes tortoise does in thinking your wanting a SVN move to accompany the file system move.
There is no need to run any special commands. If you updated the sources, the next time you will run svn update subversion will seamlessly merge the changes and you will get an uptodate working copy.
If you changed some files, they will appear modified or conflicted depending on the changes made by you and other users.
This has been plaguing me for a week.
SVN keeps telling me that a certain file "does not exist in repository".
Fine. Let's just delete it. Forget about it. Ignore it. Whatever. I don't really care about this file (especially if it continues to fail the nightly check-in).
The most bizarre part? A "restore" will actually RESTORE the file from the repository, so its there (corrupted, maybe?).
...and this has to be the icing on the cake. If I delete the file through Windows Explorer, SVN will RESTORE the file from the repository, and right after that state that it doesn't exist in the repository. WTF?
Does anyone have a clue how to get rid of this?
I've already tried clean-ups, reversions, deletions and anything else imaginable, but this one has me stumped.
Thanks for any tips you might have...
It seems most likely that you have corrupted your local working copy, e.g. by moving folders or some other manipulation that you did with windows explorer but should have done through the TortoiseSVN context menu. The information inside the .svn folders now no longer matches the state of the working copy, which is confusing Subversion.
To fix this, delete the parent folder ("Originals") in your working copy with windows explorer (NOT with TortoiseSVN). Then do a TortoiseSVN "update" at the root of your working copy. This should restore the folder in working order.
Another option is to discard your working copy entirely and do a fresh checkout.
Note that the next release of Subversion (1.7) will reduce the opportunities for corrupting your working copy by centralizing all metadata in a single .svn folder at the root.
I've had similar problems with corrupted working copies. Sometimes the working copies have a lot of pending changes but unable to checkin. To resolve this, I use the following approach (svn 1.7+):
Checkout a fresh working copy into a new directory (path2)
In the fresh working copy, if the offending file is there, delete it if needed.
Commit the fresh working copy
In the fresh working copy, delete everything except the .svn directory
Copy everything from the old working copy except the .svn directory into the fresh working copy.
Commit the fresh working copy again
Delete (or backup) the old working copy
Rename the fresh working to the old working copy (path2 to path)
I had faced a similar problem wherein i had a folder, for example "FolderA" which consistently shows in svn update even though I had deleted it.
It would not even show in the folder list but svn would still recognise it as if it exists.
I followed below steps:
1.Create same folder name for which svn was giving error in the same file location
2.Added it to svn checkout. Since it gave conflict errors, i resolved it using the svn option to resolve.
3.Deleted the folder and committed my svn.
Error was resolved