Skip to content

Instantly share code, notes, and snippets.

@jerkovicl
Forked from hashg/git.merge.md
Created March 3, 2022 15:52
Show Gist options
  • Save jerkovicl/f87abab7fe9d2000d56ceb44035fb1d1 to your computer and use it in GitHub Desktop.
Save jerkovicl/f87abab7fe9d2000d56ceb44035fb1d1 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