Open rogerxu opened 6 years ago
Remove last local commit but saving local changes.
$ git reset --soft HEAD^
Reset all local changes and rollback to HEAD.
$ git reset --hard HEAD^
Keep files in work directory and remove from the index.
$ git rm --cached {{file_path}}
Abort local merge.
$ git reset --merge
Remove untracked local files.
$ git clean -f -d
Soft
Remove last local commit but saving local changes.
Hard
Reset all local changes and rollback to HEAD.