I read this question , and now I have this doubt as to how git pull work with refpec :
Step 1 : I am on branchA.
Step 2 : I do `git pull origin branchB:branchC`
Step 2 is not a true merge, it's a fast-forward merge. Fast-forwarding is the only kind of merge possible for a non-current (i.e., not currently checked out) branch. If fast-forwarding is not possible git
would abort fetch/pull
; in that case you could either do a true merge (checkout branchC and run git pull origin branchB
) or do a forceful update (git fetch origin +branchB:branchC
) thus loosing your local commits at the head of branchC.