Advertisement
Guest User

Untitled

a guest
Jul 21st, 2019
304
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. ```shell
  2.  
  3. # Sync master
  4. git checkout master
  5. git pull origin master
  6.  
  7. # Create a new branch based on master
  8. git checkout -b feature
  9.  
  10. # Some work
  11. git commit -am "My changes"
  12.  
  13.  
  14. # keep abreast of other changes, to your feature branch or master.
  15. # rebasing keeps our code working, merging easy, and history clean.
  16. git fetch origin
  17.  
  18. # optional: only if other people works on feature branch
  19. git rebase origin/feature
  20.  
  21. git rebase origin/master
  22.  
  23. # optional: push your branch for discussion (pull-request)
  24. # you might do this many times as you develop.
  25. git push origin feature
  26.  
  27. # optional: feel free to rebase within your feature branch at will.
  28. # ok to rebase after pushing if your team can handle it!
  29. git rebase -i origin/master
  30.  
  31. # merge when done developing.
  32. # --no-ff preserves feature history and easy full-feature reverts
  33. # merge commits should not include changes; rebasing reconciles issues
  34. # github takes care of this in a Pull-Request merge
  35. git checkout master
  36. git pull origin master
  37. git merge --no-ff feature
  38. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement