Skip to content

Latest commit

 

History

History
33 lines (33 loc) · 571 Bytes

workaround.md

File metadata and controls

33 lines (33 loc) · 571 Bytes

check differences between commits

git diff <comm1> <comm2>

remove everything after a commit

git reset --hard <commit Hash>

Undo last commit but keep changes into staging

git reset --soft HEAD^

or for more commits:

git reset --soft HEAD~3

Undo last 2 commits from local and then remote repo

git reset --hard HEAD~2
git push origin HEAD --force

See the changes done with last commit

git show

or

git diff HEAD^ HEAD

Unstage files from staging

git restore --staged FILE