-
Notifications
You must be signed in to change notification settings - Fork 1
Modifying an existing project
Alex Forrence edited this page May 2, 2016
·
4 revisions
How to take an existing project, make changes, and submit those as a pull request. (This is subject to change -- I'm still hashing out the "right" way to do it) (This also assumes everyone has read/write access to the remote repo, which may not be true in the future)
- Assuming you're already in the correct directory, check out a new branch locally with
git branch <branch_name>. - Use
git checkout <branch_name>to switch to the new branch. - Same
git add,git commitas on master. If you want to push the branch remotely (to Github), usegit push -u origin <branch_name>. - To locally merge the branch, switch to master and do
git merge <branch_name>, then push to Github. 4.2. To remotely merge the branch, push the branch and follow the Github instructions on pull requests. - To delete the local branch,
git branch -d <branch_name>. To delete the remote branch, get on Github and do it from the branches page, eg (https://github.com/BLAM-Lab-Projects/github-notes/branches).
Addendum. Switch back to the master branch with git checkout master.
Addendum. Keep up to date with master with git rebase master (if branch is local only), or git merge master (if branch is also remote).
http://stackoverflow.com/questions/5691557/how-can-i-keep-my-branch-up-to-date-with-master-with-git