Saturday 22 December 2012

Git: how to revert (discard) changes since last commit

# see the hash of the last commit
$ git log
# discard changes since last commit
$ git reset --hard 423523423432
This reverts all files committed. New files still remain and you should remove them manually
# see which files should be removed, i.e. have been added since last commit 
$ git status

No comments:

Post a Comment