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?
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
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.