Can’t seem to discard changes in Git

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

Revert a range of commits in git

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

How do I revert an SVN commit?

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?

Remove specific commit

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