Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. ## Bring your current branch up-to-date with master, and squash all your working commits
  2.  
  3. ## commit any working changes on branch "${BRANCH}", then...
  4.  
  5. ## rename the branch to reflect it has the unsquashed commits
  6. git branch -m ${BRANCH}-unsquashed
  7.  
  8. ## crete a new local branch to start with the latest version of master
  9. git checkout master
  10. git checkout -b ${BRANCH}
  11.  
  12. ## squash in your working commits
  13. git merge --squash ${BRANCH)-unsquashed
  14.  
  15. ## commit the changes, opening your editor to provide a good commit message
  16. ## describing the work you were doing
  17. git commit -a
  18.  
  19. ## push the new branch to the your remote, force only if you've previously
  20. ## pushed some of the squashed commits and know you won't overwrite anyone's
  21. ## work
  22. git push --set-upstream ${REMOTE} ${BRANCH} --force
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement