Skip to content

Instantly share code, notes, and snippets.

@sanchojaf
Last active April 29, 2020 14:16
Show Gist options
  • Save sanchojaf/13ad090459d1120437a931951fbf142b to your computer and use it in GitHub Desktop.
Save sanchojaf/13ad090459d1120437a931951fbf142b to your computer and use it in GitHub Desktop.

Approach to keep a feature_branch up to date with the development branch

Where more than one developer could be working in the feature_branch, creating branch using as base feature_branch

ensure to be up to date with feature_branch

git checkout feature_branch
git pull origin feature_branch

ensure to be up to date with development

git checkout development
git pull origin development

merge development in feature_branch

git checkout feature_branch
git merge development

push to feature_branch

git push origin feature_branch

In the same way, If you are working in a PR with base: feature_branch and you have conflict, then you can try

git checkout feature_branch
git pull origin feature_branch
git checkout branch_name
git merge feature_branch
git push origin branch_name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment