dt.iki.fi

Git tricks

Collection of useful git commands etc.

Revert a pull/merge etc.

  • get a list of recent commits with git log --oneline
  • select the hash (first word on each line) of the one you want to revert
  • git revert -m 1 <selected_hash>