N.M
N.M

Reputation: 5

sync latest changes from master to featuer branch

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.

Upvotes: -1

Views: 3286

Answers (2)

ruby6221
ruby6221

Reputation: 286

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.

Upvotes: 0

matt
matt

Reputation: 534925

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

Upvotes: 2

Related Questions