I have branch Master
, branchA
and branchB
.
Now I'm working in the branchA
and I need to merge branchA
with branchB
and proceed my work in the branchA
. All files are comitted in the branchA
and branchB
.
What's the fast way to implement it?
To merge branches locally, use git checkout to switch to the branch you want to merge into. This branch is typically the main branch. Next, use git merge and specify the name of the other branch to bring into this branch. This example merges the jeff/feature1 branch into the main branch.
Git merge will combine multiple sequences of commits into one unified history. In the most frequent use cases, git merge is used to combine two branches.
To do a merge (locally), git checkout the branch you want to merge INTO. Then type git merge <branch> where <branch> is the branch you want to merge FROM. Because the history of master and the history of make_function share common ancestors and don't have any divergence descendents, we get a "fast-forward" merge.
If I understood your question, you want to merge branchB
into branchA
. To do so,
first checkout branchA
like below,
git checkout branchA
Then execute the below command to merge branchB
into branchA
:
git merge branchB
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