Useful git operations in a developer's daily work Undo all changes since last commit Source git reset HEAD --hard git clean -fd Resolve conflicts with either ours or theirs For each conflicted file you get, you can specify: git checkout --ours -- <paths> # or git checkout --theirs -- <paths> source