I created a new git branch B
from branch A
with tracking option.
Now, when A
branch gets updated by few commits, I want to pull the commits to B
as well, so I can keep track of it, and do not have to face big change sometimes later.
How should I approach this? Is it automatically done in git?
You want to bring changes from development branch to feature branch. So first switch to feature branch and merge development branch into it. In case you want the commits from develop branch too, use the non fast forward merge --no-ff approach. Else do not use --no-ff .
This is not made automatically. You have to manually merge your changes from A to B, which is pretty simple. Just switch to branch B and do
git merge A
Which will automatically merge your changes from A to B. As long as you don't have any conflicts, all of the changes in A will be marked as merged in B. A common best practices is to make daily merges, but that is dependent on the number of users/commits using your branch.
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