Tools, VIM

Git Commit Weirdness

Sometimes when we pull from upstream origin in terminal, we see git prompting to enter vim. And if we left it hanging there and went ahead committing somewhere else, it would treat all those changes in master as your own contribution, because merge didn’t happen before commit.

Solution:

$ git reset --hard HEAD^

Pull from upstream again, actually entering vim this time, getting out, and commit.

Standard