Guest User

Untitled

a guest
Apr 20th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. function gitsq (){
  2. CURRENT_BRANCH=`git branch | /bin/grep ^* | cut -d" " -f2`
  3. UPSTREAM_BRANCH=$1
  4. POSTFIX="-final"
  5. echo "Squashing $CURRENT_BRANCH onto $CURRENT_BRANCH$POSTFIX \n"
  6. git checkout $UPSTREAM_BRANCH
  7. git checkout -b $CURRENT_BRANCH$POSTFIX
  8. git merge --squash --no-commit $CURRENT_BRANCH
  9. echo "DONE! Dont forget to commit\n"
  10. }
Add Comment
Please, Sign In to add comment