Home > Blockchain >  Update github branch from another branch
Update github branch from another branch

Time:03-01

I have created a branch from another branch. Then I come back to previous branch and work on it. Now I have switched to second branch. But this second branch don't have the new changes of first branch. I just want to update the second branch from first branch without deleting any of them.

CodePudding user response:

But this second branch don't have the new changes of first branch

Switching to the second branch alone is not enough for said branch to reflect changes committed in the first branch.

You would need to git merge branch1 or, if you are alone working on branch2: git rebase branch1 (if you want to keep a linear history).

Then, and only then, would you see branch1 changes in branch2.

  • Related