Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Clone another's repo, branch and merge
- #Ask to be made a "contributor" so you can commit directly to their repo
- git clone git@github.com:calebsmith/fn.py.git
- # Can work as normal on the master branch, *or* create a branch (if feature/bug fix is mostly orthogonal)
- Creating branches
- git checkout -b mybranchname
- #....work
- git add .
- git commit -m 'added feature x'
- git push origin mybranchname
- # when ready to merge in and share with everyone on the team
- git checkout master
- git pull origin master
- git merge mybranchname
- git push origin master
- Work on and see your teammate's branches
- #After they have committed and pushed their branch with (git push origin branchname)
- # You are currently on master
- git checkout -b branchname
- git pull origin branchname
- # Now you have their code. can merge in if desired with:
- git checkout master
- git pull origin master
- git merge branchname
- # It is merged, let's update the upstream for everyone
- git push origin master
- Update feature branch with upstream changes (My teammate changed master, my branch was made off of an old master)
- git checkout master
- git pull origin master
- git checkout mybranchname
- git merge master
- git push origin mybranchname
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement