I need to create a branch from another branch with its latest changes. I use bitbucket, I created via website panel and I checked out to the new branch in my VS code but I realized that the latest changes don't come. (suppose there is a branch called A
which created from the development
branch and the A
branch has a bunch of commits and now I need branch B
from A
with its commits) and it seems I create my new branch B from the A but without commits. how can I bring changes in branch B?
CodePudding user response:
You can use this command in branch A
:
git checkout -b B A
This way you have branch B
with all A
commit.