hayio
3/17/2017 - 12:35 PM

Git undo operations.

Git undo operations.

# show recent operation list, checkout to fourteenth operation
git reflog
git checkout @HEAD{14}

# unadd file
git reset <file>
# unadd all
git reset .

# revert file to commit
git checkout HEAD <path-to-file>