Je trouve les docs git très énigmatiques à propos de ce problème. Je veux faire une chose simple, mais il semble que ce ne soit pas simple du tout.Comment dire à Git de toujours tirer la branche principale?
je la situation suivante:
$ git remote -v
origin git://192.168.0.49/mnt/repos
stick /mnt/titanium/podaci/repos
je peux utiliser git tirer chercher et de fusionner d'origine, et qui fonctionne très bien:
$ git pull
Already up-to-date.
je peux tirer de bâton comme ceci:
$ git pull stick master
Already up-to-date.
Cependant, quand je tire de bâton sans maître partie , je reçois ce message:
$ git pull stick
From /mnt/titanium/podaci/repos
* [new branch] su2009 -> stick/su2009
You asked me to pull without telling me which branch you
want to merge with, and 'branch.master.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.master.remote = <nickname>
branch.master.merge = <remote-ref>
remote.<nickname>.url = <url>
remote.<nickname>.fetch = <refspec>
See git-config(1) for details.
Certaines choses me confondent ici. Que signifie "votre fichier de configuration" ici? Quel fichier dois-je modifier et que dois-je taper exactement? Qu'est-ce que surnom dans ce cas?
Je m'attendrais à ce que ce que j'essaie d'accomplir est très commun, mais je n'ai pas été capable de trouver une réponse directe à un exemple.
Votre dernière phrase est cruciale. J'espérais qu'il y avait un moyen de contourner ce problème. –
Je ne sais pas d'un côté - 'branche. .remote' et 'branch. .merge' fonctionnent main dans la main, et chaque branche ne peut avoir qu'une seule liste 'remote'. –
mipadi
Eh bien, je suppose que c'est exactement comme ça que Git fonctionne. Peut-être que je soumettrai une demande de fonctionnalité aux développeurs si cela m'agace trop (ce qui n'est pas très probable). Réponse acceptée. –