Rod McLaughlin


How to get the latest commit in Git (30 aug 14)

You committed to a Git repo. You pushed it to another box. You log onto that box. You clone that repo from where it is to another folder, then git checkout master. But the files are months old. What happened to the latest commit? Well it's there, but you have to tell Git to find it:

$ git checkout `git log -1 --all | cut -c 8-48 | head -1`



Back
Portland London