git reset --soft HEAD~1
git fetch origin git rebase origin/master git push --force --set-upstream origin $(git branch --show-current)
git log --graph --decorate --pretty=oneline --abbrev-commit
git checkout master && git pull git checkout - git rebase master git push origin $(git branch --show-current) --force
git reset --soft HEAD^ git reset HEAD path/to/unwanted_file git commit -c ORIG_HEAD
git checkout -- filename
git reset HEAD filename git checkout -- filename
git checkout origin/master filename
git reset --hard origin/master
git checkout yourBranch git reset $(git merge-base master yourBranch) git add -A git commit -m "one commit on yourBranch"
git checkout master git pull git checkout - git reset --soft origin/HEAD git commit -m "squashing commits" git rebase master git push -f
git log git rebase -i HEAD~[NUMBER] git push origin branchName --force git checkout master git pull origin master git checkout branchName git rebase master git push origin branchName --force