git config --local user.name "Your name"
git config --local user.email "yourmail@example.com"
git rebase master
git push origin :<branch-name>
git reset HEAD~1
git fetch -p
git commit --amend
git merge --squash <branch-to-squash-from>
git rebase -i HEAD~<number-of-commits>
git log --graph --oneline --all --decorate --topo-order
git tag v<version>
git branch -m <old-branch-name> <new-branch-name>
git push origin :<old-branch-name>
git push --set-upstream origin <new-branch-name>
git branch --merged master
git checkout <commit> -- <file-path>
git checkout <commit>^ -- <file-path>
git check-ignore -v <file-path>
git remote set-url origin <new-origin-url>
git reset --hard HEAD~1 && git push -f origin master
git reset --hard origin/master
git merge-base feat/A feat/B
git pull --rebase
git branch -r
git branch | grep -v "main" | xargs git branch -D
git fetch origin pull/1/head:test
You have to find the PR branch (hover over the branch name in the PR).
git fetch https://bitbucket.org/XXXXX/YYYY/branch/ZZZZ master
XXXX -> team YYYY -> project name ZZZZ -> PR branch name