Is there a way to recover from an accidental “svn revert”?
There is a solution… go to your recycle bin you’ll find there the latest version of the deleted file. Tortoise “throwing” to the recycle bin every file that it revert.
There is a solution… go to your recycle bin you’ll find there the latest version of the deleted file. Tortoise “throwing” to the recycle bin every file that it revert.
Let’s start with a qualitative description of what we want to do (much of this is said in Ben Straub’s answer). We’ve made some number of commits, five of which changed a given file, and we want to revert the file to one of the previous versions. First of all, git doesn’t keep version numbers … Read more
This seems like a bug in msysgit indeed. As a workaround, try creating a .gitattributes file containing * -text This will tell git not to perform EOL conversions on any files.
This has been bothering me for a while, almost every repo I’d check out had changes that I couldn’t discard. Long story short, I tried all of the above, nothing worked. This is what I did to get things back to normal (on a Mac): Completely remove the autocrlf & safecrlf settings from ~/.gitconfig Completely … Read more
Here’s the cheat sheet on the commands: hg update changes your working copy parent revision and also changes the file content to match this new parent revision. This means that new commits will carry on from the revision you update to. hg revert changes the file content only and leaves the working copy parent revision … Read more
I would recommend to use the new git filter-repo, which replaces BFG and git filter-branch. Note: if you get the following error message when running the above-mentioned commands: Error: need a version of `git` whose `diff-tree` command has the `–combined-all-paths` option` it means you have to update git. First: do that one copy of your … Read more
What version of Git are you using? Reverting multiple commits in only supported in Git1.7.2+: see “Rollback to an old commit using revert multiple times.” for more details. The current git revert man page is only for the current Git version (1.7.4+). As the OP Alex Spurling reports in the comments: Upgrading to 1.7.4 works … Read more
Both examples must work, but svn merge -r UPREV:LOWREV . undo range svn merge -c -REV . undo single revision in this syntax – if current dir is WC and (as in must done after every merge) you’ll commit results Do you want to see logs?
There are four ways of doing so: Clean way, reverting but keep in log the revert: git revert –strategy resolve <commit> Harsh way, remove altogether only the last commit: git reset –soft “HEAD^” Note: Avoid git reset –hard as it will also discard all changes in files since the last commit. If –soft does not … Read more
I was having this problem on Windows but wasn’t prepared to look into the ramifications of using config –global core.autocrlf false I also wasn’t prepared to abandon other private branches and goodies in my stash and start with a fresh clone. I just need to get something done. Now. This worked for me, on the … Read more