This repository has been archived by the owner on May 29, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 185
How to Create Feature Branches
Bryan Masamitsu Parsons edited this page Sep 25, 2018
·
1 revision
This assumes you already have a clone of the repo in question.
Simple recipe:
- Update master branch
git checkout master; git pull origin/master
- Create new local branch:
git checkout -b issue_99 master
- Develop and commit code on new branch:
git commit -m "Did stuff"
- Setup local tracking and push to remote server:
git push -u origin issue_99
Detailed recipe:
- Inspect your local and remote branches
$ git branch -av
- Update master branch
git checkout master
git pull origin/master
- Create new local branch
issue_99
based on your local branchmaster
git branch issue_99 master
- Checkout the new local feature branch
git checkout issue_99
- Make changes to files on the new feature branch, and commit them
echo "Hello World" > README.txt
git add README.txt
git commit README.txt -m "Documentation, initial commit of README file"
- Push your feature branch up to the Github GPSTk repo and set-up local tracking
git push -u origin issue_99
- Confirm that your new feature branch is present
git branch -av
- Confirm that your local branch tracks the remote branch
git remote show origin