-
-
Notifications
You must be signed in to change notification settings - Fork 775
How to work off of a feature branch
Josh Bubar edited this page Jul 14, 2021
·
14 revisions
This guide describes how to set up a local branch while working off of a feature branch.
-
Fetch the most recent changes on the upstream remote
git fetch upstream
-
Create the local branch off of the upstream remote branch
# example: git checkout wins-feature-1 upsream/wins-feature-1 # {FEATURE BRANCH NAME} needs to be identical to the feature branch name on the upstream remote repo git checkout {FEATURE BRANCH NAME} upstream/{FEATURE BRANCH NAME}
-
Create your new branch off of the new feature branch that you just created!!
git checkout -b {YOUR BRANCH}
- Update the branch with the latest changes using the following command
# example: git pull upstream wins-feature-1 git pull {NAME OF REMOTE} {NAME OF REMOTE BRANCH}
- Stage and commit your changes
git add {FILES CHANGED} git commit -m "{COMMIT MESSAGE}"
- Push changes to your remote
# this is the same as always git push origin {NAME OF YOUR LOCAL BRANCH}
- Create a pull request that is comparing across forks, from your branch to the feature branch
Click the arrow below each category to view links (or view original alphabetical list by clicking "Pages" above) :