Git - Undoing What is Done

From EdWiki

Revision as of 10:00, 23 June 2015 by Jshankar (Talk | contribs) (1 revision imported: EdWiki -- From Shukra)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Undoing What is Done

git checkout
  • Used to checkout a specific version/branch of the tree
git reset
  • Moves the tree back to a certain specified version
  • Use the --force to ignore working changes
git revert
  • Reverts a commit
  • Does not delete the commit object, just applies a patch
  • Reverts can themselves be reverted!
  • Git never deletes a commit object