Skip to content

Instantly share code, notes, and snippets.

@hashg
Created December 2, 2019 18:49
Show Gist options
  • Save hashg/6e01af109dda6b0a74bd01b2d4cf1b73 to your computer and use it in GitHub Desktop.
Save hashg/6e01af109dda6b0a74bd01b2d4cf1b73 to your computer and use it in GitHub Desktop.
How to get changes from another branch
  • go to the master branch our-team

git checkout our-team

  • pull all the new changes from our-team branch

git pull

  • go to your branch featurex

git checkout featurex

  • merge the changes of our-team branch into featurex branch

git merge our-team or git cherry-pick {commit-hash} if you want to merge specific commits

  • push your changes with the changes of our-team branch

git push

Note: probably you will have to fix conflicts after merging our-team branch into featurex branch before pushing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment