If I do a git push, I see 3 branches involved. 1) The local branch I am working on, say 'foo1' 2) the local remote-tracking branch 'origin/foo2' (which always is on the same commit as the remote foo3 after push/pull) 3) 'foo3' in the remote repo. Naturally normally they all would be called foo, but I want different names so I can properly understand git and ask this question here. I don't understand where I can specify foo2. When I do
git push origin foo1:foo3
And having that in my .git/config
[branch "master"]
remote = origin
merge = refs/remotes/origin/foo2
Point 1 and 3 are ok, but I don't have an origin/foo2 in my local repo. What am I missing? Or is the answer that my remote tracking branches are always named exactly the same way as the remotes - that would be fine for me - I just want to understand git properly.
The git-push manual also only talks about two refs (the refspec src and dst), point 1 and 3, in my example. Where does the manual talk about that after the dst branch on the remote repo is updated, also the local remote-tracking ref is updated?