Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### I would always recommend to add aliases into global git configuration
- # ππ» Rebase current branch on master
- alias.ready=!git checkout master && git pull && git checkout - && git rebase master
- # β Get distance of commits against master. Useful before rebasing
- alias.distance=!git rev-list origin/master.. --count
- # π© Squash commits against master with the count of distance to master branch
- alias.squash=!git rebase -i HEAD~`git rev-list origin/master.. --count`
- # β οΈ Force commits and pushes the changes skipping pre commits and pre push hooks. Useful before going home βΊοΈ
- alias.cmp=!f() { git add -A && git commit -m "$@" --no-verify && git push -f --no-verify origin HEAD; }; f
- # ποΈ Remove local branch and checkout fresh one from the remote
- alias.cbr=!f() { git checkout master && git fetch && git branch -D "$1" && git checkout "$1"; }; f
Add Comment
Please, Sign In to add comment