Generally when performing a merge operation, it is best to first checkout to the branch you want to perform the merge operation, that is, branchB, and then proceed
git merge branchA //默认为当前branch,即branchB
Because you cannot ensure whether a confit is generated, checkout to branchB first.
In addition, to be on the safe side, you can create a backup branch before merging
git checkout -b branchB_backup
This way, even if something uncontrollable happens after you merge, you can still check back.
git merge branchA branchB, branchB generally defaults to the current branch, so
Generally when performing a merge operation, it is best to first checkout to the branch you want to perform the merge operation, that is, branchB, and then proceed
Because you cannot ensure whether a confit is generated, checkout to branchB first.
In addition, to be on the safe side, you can create a backup branch before merging
This way, even if something uncontrollable happens after you merge, you can still check back.