https://www.git-tower.com/blog/git-cheat-sheet/
https://confluence.atlassian.com/bitbucketserver/basic-git-commands-776639767.html
git clone git@git.example.com:project.git |
git checkout branch1 git pull |
git checkout -b temporary-branch git branch |
git add somechangedfiles git commit -m "add some fix to somechangedfiles" git push origin temporary-branch |
git commit -a -m "fix something in couple of files" |
git pull origin master git push origin temporary-branch |
git checkout master git push origin :temporary-branch git branch -d temporary-branch git branch -D temporary-branch |
git log git rebase --interactive #pick 02bbcc5 update1 #squash 22ee95e update2 #squash 1dcc468 update3 |
git rebase --interactive origin/temporary-branch~4 temporary-branch git push origin +temporary-branch |
git checkout -f |
git reset --soft HEAD~1 |
git checkout filename |
git checkout source-branch git log git checkout destination-branch git cherry-pick <commit-hash> git push origin destination-branch |