Git quick checklist

Resets all changes done

git reset --hard

Give a git commit without changing the previous commit message

git commit --amend --no-edit

Modify last commit message

git commit --amend -m "An new updated commit message"

Push to master

git push origin HEAD:refs/for/master

Discard all changes made to a file

discard changes in locally modified file

 git restore main.cpp

git delete local branch

git branch --delete old-branch

Leave a comment