Say I have branchA
with the latest features and then I have the branchB
which has the hotfixes not yet sync into branchA
.
What I want to do is merged all hotfixes into that latest features (branchA
) but only the diff.
I saw that git log branchA..branchB
actually shows the commits in branchB
not yet existing in branchA
. Unfortunately I don't know the command how to merged the branchB
diff commits into branchA
On the Github, go to the Source view of your project. You will see a link named 'Branch List'. Once the page opens you can see a list of all the remote branches. Hit on the Compare button in front of any of the available branches to see the difference between two branches.
No, merging does only affect one branch.
You're very close. You can do it as a patch:
git diff branchA..branchB > mypatch.patch
Then apply the patch to the desired branch:
git apply mypatch.patch
If you want to apply changes from branch X to current branch:
git diff ..X | git apply -
This is simply a shorter version of the accepted answer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With