Home > Back-end >  sync latest changes from master to featuer branch
sync latest changes from master to featuer branch

Time:12-14

there are two branches one is release and the other is a feature on which I'm working but after making my changes I did commit and push, but earlier a few changes were made to the release branch so how do I sync my feature branch with the changes in the release branch I don't know what to try, tried searching but don't want to risk

feature branch was made from the release branch.

CodePudding user response:

If you had not pushed your feature branch, you could rebase it onto the latest state of the release branch:

git fetch origin
git rebase release

Since you have already pushed your feature branch, the wisest approach is to merge the latest state of the release branch into it:

git fetch origin
git merge release

CodePudding user response:

you can use git merge to sync your changes to another branch.
First you should checkout to release branch, and then use git merge feature.
If you are not sure, you can make a new branch from feature and another new one from release, then try it using 2 new branches until successed.

  • Related