Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ```shell
- # Sync master
- git checkout master
- git pull origin master
- # Create a new branch based on master
- git checkout -b feature
- # Some work
- git commit -am "My changes"
- # keep abreast of other changes, to your feature branch or master.
- # rebasing keeps our code working, merging easy, and history clean.
- git fetch origin
- # optional: only if other people works on feature branch
- git rebase origin/feature
- git rebase origin/master
- # optional: push your branch for discussion (pull-request)
- # you might do this many times as you develop.
- git push origin feature
- # optional: feel free to rebase within your feature branch at will.
- # ok to rebase after pushing if your team can handle it!
- git rebase -i origin/master
- # merge when done developing.
- # --no-ff preserves feature history and easy full-feature reverts
- # merge commits should not include changes; rebasing reconciles issues
- # github takes care of this in a Pull-Request merge
- git checkout master
- git pull origin master
- git merge --no-ff feature
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement