December 2008
3 posts
A common thing I do with git is push my changes to a remote repo, after first updating my project locally with all the changes others have pushed. But I always forget to update first, so the process usually goes—
push
rap my fingers on the table for five seconds while my laptop talks to github on the other side of the world
“oh crap I should have pulled first”
pull
update...
A git merge, and hence also the merging stage of a git pull, sets ORIG_HEAD to the commit that HEAD pointed to before the merge. So the commits between these two points are the ones the most recent merge introduced.
git log ORIG_HEAD..HEAD \
--pretty=format:"%Cblue%h%Creset %Cgreen%an%Creset %s"