Mieux vaut être expliqué par un exemple: je suis sur la branche 0.58 du référentiel et voici comment je tire:
git pull origin 0.58
Quand j'appelle simplement "git pull", j'obtiens:
ip238:openlierox az$ git pull
You asked me to pull without telling me which branch you
want to merge with, and 'branch.0.58.merge' in
your configuration file does not tell me either. Please
name which branch you want to merge on the command line and
try again (e.g. 'git pull <repository> <refspec>').
See git-pull(1) for details on the refspec.
If you often merge with the same branch, you may want to
configure the following variables in your configuration
file:
branch.0.58.remote = <nickname>
branch.0.58.merge = <remote-ref>
remote.<nickname>.url = <url>
remote.<nickname>.fetch = <refspec>
See git-config(1) for details.
Il semble que j'ai probablement oublié une option (--track?) Quand j'ai vérifié cette branche. Quoi qu'il en soit, j'ai défini ceci maintenant:
git config branch.0.58.merge 0.58
git config branch.0.58.remote origin
Et cela semble fonctionner. Ensuite, juste à cause de mon intérêt, j'ai jeté un coup d'œil à une autre branche à propos de ces paramètres:
ip238:openlierox az$ git config branch.0.57.merge
refs/heads/0.57
ip238:openlierox az$ git config branch.0.57.remote
origin
Je me demandais maintenant, y a-t-il une différence entre "0.58" ou devrais-je spécifier "refs / heads / 0.58"?
Quelle est la différence exactement?
heads
avec un "s".