daily pastebin goal
13%
SHARE
TWEET

Untitled

a guest Jul 12th, 2018 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ### I would always recommend to add aliases into global git configuration
  2.  
  3. # πŸ‘ŠπŸ» Rebase current branch on master
  4. alias.ready=!git checkout master && git pull && git checkout - && git rebase master
  5.  
  6. # ❓ Get distance of commits against master. Useful before rebasing
  7. alias.distance=!git rev-list origin/master.. --count
  8.  
  9. # πŸ”© Squash commits against master with the count of distance to master branch
  10. alias.squash=!git rebase -i HEAD~`git rev-list origin/master.. --count`
  11.  
  12. # ☠️ Force commits and pushes the changes skipping pre commits and pre push hooks. Useful before going home ☺️
  13. alias.cmp=!f() { git add -A && git commit -m "$@" --no-verify && git push -f --no-verify origin HEAD; }; f
  14.  
  15. # πŸ—‘οΈ Remove local branch and checkout fresh one from the remote
  16. alias.cbr=!f() { git checkout master && git fetch && git branch -D "$1" && git checkout "$1"; }; f
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top