Git: How to revert 2 files that are stubbornly stuck at “Changed but not committed”?

I spent hours trying to solve a similar issue – a remote branch that I had checked out, which stubbornly showed four files as ‘Changed but not updated’, even when deleting all files and running git checkout -f again (or other variations from this post)! These four files were necessary, but certainly hadn’t been modified … Read more

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

Mercurial — revert back to old version and continue from there

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

git status shows modifications, git checkout — doesn’t remove them

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

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)