Undo Flashcards
1
Q
git reset –hard HEAD
A
discard all local changes in your working directory
2
Q
git checkout HEAD
A
discard local changes in a specific file
3
Q
git revert
A
revert a commit (by producing a new commit with contrary changes)
4
Q
git reset – hard
A
reset your HEAD pointer to a previous commit and discard all changes since then
5
Q
git reset
A
reset your HEAD pointer to a previous commit and preserve all changes as unstaged changes
6
Q
git reset –keep
A
reset your HEAD pointer to a previous commit and preserve uncommitted local changes