I don’t understand the logic behind creating FETCH_HEADs in some cases – example:
$ git --version
git version 1.7.2.5
$ git fetch aarep
From ../aa
* [new branch] master -> aarep/master
* [new branch] skin -> aarep/skin
## Fair enough, creating FETCH_HEADs here wouldn't help
$ git fetch aarep master
From ../aa
* branch master -> FETCH_HEAD
## Instead of creating a remote tracker, git creates a FETCH_HEAD. No problem.
$ git fetch aarep master skin
From ../aa
* branch master -> FETCH_HEAD
* branch skin -> FETCH_HEAD
## What's the point of creating FETCH_HEADs here - only one would survive ?!
Have a look at the contents of FETCH_HEAD after your last example. Both refs are there, perhaps something like:
It’s not overwritten.
For what it’s worth, here’s a use of this functionality in
git-pull, which is implemented as a shell script: