The list of Git commands that tackle most everyday routines. Branches The commands to work with local and remote branches. Pull and rebase
1 |
git pull --rebase=i origin feature-1 |
Commit difference between branches
1 |
git log origin/develop..origin/master --oneline |
Overwrite remote branch with local branch
1 2 |
git checkout local-feature-branch git push -f origin HEAD:remote-feature-branch |
Useful when it’s need to do restore from local branch. Commits count between branches
1 |
git rev-list --left-right --count origin/branch-1...origin/branch-2 | cut -f1 |
–no-merges parameter allow to…