Tuesday, 9 July 2019

Git discard local changes

  1. Discard all local changes, but save them for possible re-use later: git stash.
  2. Discarding local changes (permanently) to a file: git checkout -- <file>
  3. Discard all local changes to all files permanently: git reset --hard.

No comments:

Post a Comment