{"thread":{"id":"23556","subject":"git pull behavior changed?","startedAt":"2010-04-21T21:13:38Z","lastAt":"2010-04-22T21:13:10Z","messageCount":22,"participants":["Aghiles","Sverre Rabbelier","Matthieu Moy","Randal L. Schwartz","Jeff King","Petr Baudis","Junio C Hamano","Andreas Schwab"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"140053","messageId":"u2z3abd05a91004211413rcd2440fdq7946ef4764b24362@mail.gmail.com","threadId":"23556","inReplyTo":null,"subject":"git pull behavior changed?","fromName":"Aghiles","fromEmail":"aghilesk@gmail.com","sentAt":"2010-04-21T21:13:38Z","receivedAt":"2010-04-21T21:13:38Z","isPatch":false,"sender":{"key":"aghilesk@gmail.com","avatar":null},"body":"Hello,\n\nI used to 'git pull' in a branch and it was working without any\nquestions asked. But now, if I do the following:\n\ngit checkout -b test\ngit pull\n\nI get a warning telling me that \"You asked me to pull without\ntelling me which branch ...\". I would expect that my new local\nbranch behaves the same way as the master branch.\n\nI am using 1.7.0.3\n\n  -- aghiles\n"},{"id":"140058","messageId":"v2hfabb9a1e1004211422ybbf47ef0gd5dfd1791eb03c16@mail.gmail.com","threadId":"23556","inReplyTo":"u2z3abd05a91004211413rcd2440fdq7946ef4764b24362@mail.gmail.com","subject":"Re: git pull behavior changed?","fromName":"Sverre Rabbelier","fromEmail":"srabbelier@gmail.com","sentAt":"2010-04-21T21:22:47Z","receivedAt":"2010-04-21T21:22:47Z","isPatch":false,"sender":{"key":"srabbelier@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3098?v=4"},"body":"Heya,\n\nOn Wed, Apr 21, 2010 at 23:13, Aghiles <aghilesk@gmail.com> wrote:\n> git checkout -b test\n\nWhen you do this you're telling git \"I want a new branch from where I\nam right now\". If you want to be able to pull in a similar way to how\nmaster works, use the '--track' option.\n\n-- \nCheers,\n\nSverre Rabbelier\n"},{"id":"140061","messageId":"w2w3abd05a91004211434obc828fcbse5cd809c8419667a@mail.gmail.com","threadId":"23556","inReplyTo":"v2hfabb9a1e1004211422ybbf47ef0gd5dfd1791eb03c16@mail.gmail.com","subject":"Re: git pull behavior changed?","fromName":"Aghiles","fromEmail":"aghilesk@gmail.com","sentAt":"2010-04-21T21:34:19Z","receivedAt":"2010-04-21T21:34:19Z","isPatch":false,"sender":{"key":"aghilesk@gmail.com","avatar":null},"body":">\n> When you do this you're telling git \"I want a new branch from where I\n> am right now\". If you want to be able to pull in a similar way to how\n> master works, use the '--track' option.\n>\n\nThis means that when pulling I will be pulling from the remote ? That\nis what I want to achieve. I just want all my branches to pull from the\nsame remote (as my master branch does).\n\nThank you for your help.\n\n  -- aghiles\n"},{"id":"140064","messageId":"y2p3abd05a91004211455r30d13932t92dfbedff581b9a1@mail.gmail.com","threadId":"23556","inReplyTo":"v2hfabb9a1e1004211422ybbf47ef0gd5dfd1791eb03c16@mail.gmail.com","subject":"Re: git pull behavior changed?","fromName":"Aghiles","fromEmail":"aghilesk@gmail.com","sentAt":"2010-04-21T21:55:49Z","receivedAt":"2010-04-21T21:55:49Z","isPatch":false,"sender":{"key":"aghilesk@gmail.com","avatar":null},"body":"> When you do this you're telling git \"I want a new branch from where I\n> am right now\". If you want to be able to pull in a similar way to how\n> master works, use the '--track' option.\n\nActually, the '--track' option is exactly what I don't want ! :) It tells me:\n\n\"Branch test set up to track local branch refs/heads/master.\"\n\nWithout the '--track' option it seems to work as expected: when I pull\nit downloads data form the remote but then stops before merging.\nThis used to work! What happened ? :(\n\n  -- aghiles\n"},{"id":"140065","messageId":"u2zfabb9a1e1004211459k74c23b56tbd8de958d82f0cca@mail.gmail.com","threadId":"23556","inReplyTo":"y2p3abd05a91004211455r30d13932t92dfbedff581b9a1@mail.gmail.com","subject":"Re: git pull behavior changed?","fromName":"Sverre Rabbelier","fromEmail":"srabbelier@gmail.com","sentAt":"2010-04-21T21:59:05Z","receivedAt":"2010-04-21T21:59:05Z","isPatch":false,"sender":{"key":"srabbelier@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3098?v=4"},"body":"Heya,\n\nOn Wed, Apr 21, 2010 at 23:55, Aghiles <aghilesk@gmail.com> wrote:\n> Without the '--track' option it seems to work as expected: when I pull\n> it downloads data form the remote but then stops before merging.\n> This used to work! What happened ? :(\n\nSee the --track documentation, you need to tell it to track upstream\ninstead of master.\n\n-- \nCheers,\n\nSverre Rabbelier\n"},{"id":"140066","messageId":"vpqsk6omppf.fsf@bauges.imag.fr","threadId":"23556","inReplyTo":"y2p3abd05a91004211455r30d13932t92dfbedff581b9a1@mail.gmail.com","subject":"Re: git pull behavior changed?","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2010-04-21T21:59:56Z","receivedAt":"2010-04-21T21:59:56Z","isPatch":false,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Aghiles <aghilesk@gmail.com> writes:\n\n>> When you do this you're telling git \"I want a new branch from where I\n>> am right now\". If you want to be able to pull in a similar way to how\n>> master works, use the '--track' option.\n>\n> Actually, the '--track' option is exactly what I don't want ! :) It\n> tells me:\n\nRead the doc. It is what you want, but you mis-use it.\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"140068","messageId":"h2o3abd05a91004211504pfc2de8b7sa37c9c0a4dd14f57@mail.gmail.com","threadId":"23556","inReplyTo":"vpqsk6omppf.fsf@bauges.imag.fr","subject":"Re: git pull behavior changed?","fromName":"Aghiles","fromEmail":"aghilesk@gmail.com","sentAt":"2010-04-21T22:04:36Z","receivedAt":"2010-04-21T22:04:36Z","isPatch":false,"sender":{"key":"aghilesk@gmail.com","avatar":null},"body":">\n>>> When you do this you're telling git \"I want a new branch from where I\n>>> am right now\". If you want to be able to pull in a similar way to how\n>>> master works, use the '--track' option.\n>>\n>> Actually, the '--track' option is exactly what I don't want ! :) It\n>> tells me:\n>\n> Read the doc. It is what you want, but you mis-use it.\n\nI will read the doc, thank you for the advice.\n\n'When creating a new branch, set up configuration to mark the start-point\nbranch as \"upstream\" from the new branch.'\n\nSo no, that's not what I want.\n\nUsing :\n  git branch test\n  git checkout test\n  git pull origin HEAD\n\nIs what I want and it works. BUT, I used to need only 'git pull'\n\nAgain, the behavior changed since I last used this. No one cares?\n\n  -- aghiles\n"},{"id":"140071","messageId":"vpq8w8gjvhn.fsf@bauges.imag.fr","threadId":"23556","inReplyTo":"h2o3abd05a91004211504pfc2de8b7sa37c9c0a4dd14f57@mail.gmail.com","subject":"Re: git pull behavior changed?","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2010-04-21T22:23:16Z","receivedAt":"2010-04-21T22:23:16Z","isPatch":false,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Aghiles <aghilesk@gmail.com> writes:\n\n> Again, the behavior changed since I last used this. No one cares?\n\nThe behavior of Git did not change. The content of your configuration\nfile or the branch you are on did. The way to put the right content in\nyour configuration file is --track.\n\nWhen you create a branch, you say what the starting point of your\nbranch is, and if you say --track, Git remembers it and uses it for\npull next time. The simplest is to start your branch based on\nremotes/<name>/<branchname>, which is where your probably want to pull\nfrom.\n\nOtherwise, --set-upstream may help. But neither will help untill you\nRTFM.\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"140073","messageId":"z2t3abd05a91004211541y1c2c5467k5731819da7fe625@mail.gmail.com","threadId":"23556","inReplyTo":"vpq8w8gjvhn.fsf@bauges.imag.fr","subject":"Re: git pull behavior changed?","fromName":"Aghiles","fromEmail":"aghilesk@gmail.com","sentAt":"2010-04-21T22:41:16Z","receivedAt":"2010-04-21T22:41:16Z","isPatch":false,"sender":{"key":"aghilesk@gmail.com","avatar":null},"body":"> Otherwise, --set-upstream may help. But neither will help untill you\n> RTFM.\n\nMatthieu, I spend my days reading the git manual and also the source\ncode, which is not normal IMHO. I always look for examples but in the\ncase of 'git branch' there is not many that are really useful!\n\nI suggest to add this as an example since it is probably the most common\ncase (one would expect that a new branch simply mimics the characteristics\nof the starting branch, no ?)\n\n  git branch --track small_fixes origin\n\nAnd it does what I want.\n\nAgain, the behavior changed: just upgraded to 1.7.0.3, before then I was\ndoing branches like this:\n\n  git checkout -b small_fixes\n  git pull\n\n>From my point of view, that was neat!\n\nThe --track and <start-point>=origin seemed to be implied. I find that this\nis a better better default (OR 'git pull' was defaulting to 'git pull\norigin HEAD').\n\nAs of now, 'git branch x' seem to be of little use without more configuration.\n\n  -- aghiles\n"},{"id":"140074","messageId":"86tyr4v12n.fsf@red.stonehenge.com","threadId":"23556","inReplyTo":"h2o3abd05a91004211504pfc2de8b7sa37c9c0a4dd14f57@mail.gmail.com","subject":"Re: git pull behavior changed?","fromName":"Randal L. Schwartz","fromEmail":"merlyn@stonehenge.com","sentAt":"2010-04-21T23:27:12Z","receivedAt":"2010-04-21T23:27:12Z","isPatch":false,"sender":{"key":"merlyn@stonehenge.com","avatar":"https://gravatar.com/avatar/dc528d210743ff0333e6213f9ee7b33b23f1b7bc1f3c5a8c2d819074ecd7ab19?d=mp&s=160"},"body":">>>>> \"Aghiles\" == Aghiles  <aghilesk@gmail.com> writes:\n\n\nAghiles> Using :\nAghiles>   git branch test\nAghiles>   git checkout test\nAghiles>   git pull origin HEAD\n\nI do this:\n\n    git checkout -b test origin/test\n    ...\n    git pull\n\nAnd it seems to work.  It even announces that my test is tracking origin/test.\n\n-- \nRandal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095\n<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>\nSmalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.\nSee http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion\n"},{"id":"140076","messageId":"u2n3abd05a91004211657v3dcdaf40j3608f3d8f59c4c1b@mail.gmail.com","threadId":"23556","inReplyTo":"86tyr4v12n.fsf@red.stonehenge.com","subject":"Re: git pull behavior changed?","fromName":"Aghiles","fromEmail":"aghilesk@gmail.com","sentAt":"2010-04-21T23:57:17Z","receivedAt":"2010-04-21T23:57:17Z","isPatch":false,"sender":{"key":"aghilesk@gmail.com","avatar":null},"body":"On Wed, Apr 21, 2010, Randal L. Schwartz  wrote:\n>    git checkout -b test origin/test\n>    ...\n>    git pull\n>\n> And it seems to work.  It even announces that my test is tracking origin/test.\n\nYes that syntax works too (although I use origin/master since I am tracking\nthe main branch and not the remote \"test\" branch). Thank you very much.\n\nThe message announcing the tracked branch is a nice touch.\n\n  -- aghiles\n"},{"id":"140077","messageId":"20100422000131.GB14249@coredump.intra.peff.net","threadId":"23556","inReplyTo":"z2t3abd05a91004211541y1c2c5467k5731819da7fe625@mail.gmail.com","subject":"Re: git pull behavior changed?","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2010-04-22T00:01:31Z","receivedAt":"2010-04-22T00:01:31Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Apr 21, 2010 at 06:41:16PM -0400, Aghiles wrote:\n\n> Again, the behavior changed: just upgraded to 1.7.0.3, before then I was\n> doing branches like this:\n> \n>   git checkout -b small_fixes\n>   git pull\n\nWhat was the old version of git? A long time ago (maybe 1.5.x or\nearlier?) we used to default unconfigured pulls differently.\n\n-Peff\n"},{"id":"140082","messageId":"k2t3abd05a91004211713u24ff93f3of758e5e09c7b8059@mail.gmail.com","threadId":"23556","inReplyTo":"20100422000131.GB14249@coredump.intra.peff.net","subject":"Re: git pull behavior changed?","fromName":"Aghiles","fromEmail":"aghilesk@gmail.com","sentAt":"2010-04-22T00:13:48Z","receivedAt":"2010-04-22T00:13:48Z","isPatch":false,"sender":{"key":"aghilesk@gmail.com","avatar":null},"body":"On Wed, Apr 21, 2010, Jeff King wrote:\n\n> What was the old version of git? A long time ago (maybe 1.5.x or\n> earlier?) we used to default unconfigured pulls differently.\n\nI don't have the information handy but it was most probably pre-1.5.\nI don't know if my 'branching habits' are common, but I found that\nthe old behavior to be more natural with the way we work (creating\nbranches for quick parallel work).\n\nIf the current behavior is here to stay, I would humbly suggest to\nmention the 'git checkout -b x origin' syntax in the manual (and\n'git branch --track x origin').\n\nOn a positive note, I would like to say that there is a good progress\nregarding the messages git prints to guide the user. That is helpful.\n\n  -- aghiles\n"},{"id":"140085","messageId":"20100422004136.GA18570@coredump.intra.peff.net","threadId":"23556","inReplyTo":"k2t3abd05a91004211713u24ff93f3of758e5e09c7b8059@mail.gmail.com","subject":"Re: git pull behavior changed?","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2010-04-22T00:41:37Z","receivedAt":"2010-04-22T00:41:37Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Apr 21, 2010 at 08:13:48PM -0400, Aghiles wrote:\n\n> I don't have the information handy but it was most probably pre-1.5.\n> I don't know if my 'branching habits' are common, but I found that\n> the old behavior to be more natural with the way we work (creating\n> branches for quick parallel work).\n\nOK, then the behavior did change for you. But you are probably about 3\nyears too late to complain and try to get it changed. :)\n\n> If the current behavior is here to stay, I would humbly suggest to\n> mention the 'git checkout -b x origin' syntax in the manual (and\n> 'git branch --track x origin').\n\nIt is in the checkout manual, but I think the subtlety that you missed\nis that \"--track\" is going to care about whether you start your branch\nfrom your local \"master\" or the remote \"master\". Even if they're at the\nsame commit, you are interested conceptually in basing your work on what\nthe remote is doing. Maybe we could talk about this in the definition of\n<start-point>, I guess.\n\nYou may also be interested to know that \"git checkout foo\" these days\nwhen you have no \"foo\" branch will do the equivalent of \"git checkout -b\n--track foo origin/foo\", which would also do what you want.\n\n-Peff\n"},{"id":"140089","messageId":"v2z3abd05a91004211827ua3955912w676d8a3e001ed461@mail.gmail.com","threadId":"23556","inReplyTo":"20100422004136.GA18570@coredump.intra.peff.net","subject":"Re: git pull behavior changed?","fromName":"Aghiles","fromEmail":"aghilesk@gmail.com","sentAt":"2010-04-22T01:27:31Z","receivedAt":"2010-04-22T01:27:31Z","isPatch":false,"sender":{"key":"aghilesk@gmail.com","avatar":null},"body":"> OK, then the behavior did change for you. But you are probably about 3\n> years too late to complain and try to get it changed. :)\n\nDammit. :) But really no biggie. I just entered panic mode because I\nthought something got borked in my favorite tool, which is not the case\nobviously.\n\n> You may also be interested to know that \"git checkout foo\" these days\n> when you have no \"foo\" branch will do the equivalent of \"git checkout -b\n> --track foo origin/foo\", which would also do what you want.\n\nWouldn't that create/track a remote 'foo' branch ? I have no remote branches\nbut only local ones so I am always tracking origin/master.\n\n  -- aghiles\n"},{"id":"140092","messageId":"20100422021015.GB25093@coredump.intra.peff.net","threadId":"23556","inReplyTo":"v2z3abd05a91004211827ua3955912w676d8a3e001ed461@mail.gmail.com","subject":"Re: git pull behavior changed?","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2010-04-22T02:10:15Z","receivedAt":"2010-04-22T02:10:15Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Apr 21, 2010 at 09:27:31PM -0400, Aghiles wrote:\n\n> > You may also be interested to know that \"git checkout foo\" these days\n> > when you have no \"foo\" branch will do the equivalent of \"git checkout -b\n> > --track foo origin/foo\", which would also do what you want.\n> \n> Wouldn't that create/track a remote 'foo' branch ? I have no remote branches\n> but only local ones so I am always tracking origin/master.\n\nYes, it would, so I guess it doesn't help you. You should do \"git\ncheckout -b foo origin/master\", then.\n\n-Peff\n"},{"id":"140107","messageId":"20100422081055.GG3563@machine.or.cz","threadId":"23556","inReplyTo":"u2n3abd05a91004211657v3dcdaf40j3608f3d8f59c4c1b@mail.gmail.com","subject":"Re: git pull behavior changed?","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2010-04-22T08:10:56Z","receivedAt":"2010-04-22T08:10:56Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"On Wed, Apr 21, 2010 at 07:57:17PM -0400, Aghiles wrote:\n> On Wed, Apr 21, 2010, Randal L. Schwartz  wrote:\n> >    git checkout -b test origin/test\n> >    ...\n> >    git pull\n> >\n> > And it seems to work.  It even announces that my test is tracking origin/test.\n> \n> Yes that syntax works too (although I use origin/master since I am tracking\n> the main branch and not the remote \"test\" branch). Thank you very much.\n\nSo, do I understand it right that there is still no canonical syntax to\ncheck out local branch tracking a remote one of the same name, without\nspelling out the branch name twice?\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nhttp://pasky.or.cz/ | \"Ars longa, vita brevis.\" -- Hippocrates\n"},{"id":"140108","messageId":"7vy6gf52d1.fsf@alter.siamese.dyndns.org","threadId":"23556","inReplyTo":"20100422081055.GG3563@machine.or.cz","subject":"Re: git pull behavior changed?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-04-22T08:16:10Z","receivedAt":"2010-04-22T08:16:10Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Petr Baudis <pasky@suse.cz> writes:\n\n> On Wed, Apr 21, 2010 at 07:57:17PM -0400, Aghiles wrote:\n>> On Wed, Apr 21, 2010, Randal L. Schwartz  wrote:\n>> >    git checkout -b test origin/test\n> ...\n> So, do I understand it right that there is still no canonical syntax to\n> check out local branch tracking a remote one of the same name, without\n> spelling out the branch name twice?\n\nOnly if you don't count Dscho's DWIM.\n\n    $ git checkout tr/word-diff\n    Branch tr/word-diff set up to track remote branch tr/word-diff from origin.\n    Switched to a new branch 'tr/word-diff'\n"},{"id":"140120","messageId":"20100422114924.GH3563@machine.or.cz","threadId":"23556","inReplyTo":"7vy6gf52d1.fsf@alter.siamese.dyndns.org","subject":"Creating tracked branches","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2010-04-22T11:49:24Z","receivedAt":"2010-04-22T11:49:24Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"On Thu, Apr 22, 2010 at 01:16:10AM -0700, Junio C Hamano wrote:\n> Petr Baudis <pasky@suse.cz> writes:\n> \n> > On Wed, Apr 21, 2010 at 07:57:17PM -0400, Aghiles wrote:\n> >> On Wed, Apr 21, 2010, Randal L. Schwartz  wrote:\n> >> >    git checkout -b test origin/test\n> > ...\n> > So, do I understand it right that there is still no canonical syntax to\n> > check out local branch tracking a remote one of the same name, without\n> > spelling out the branch name twice?\n> \n> Only if you don't count Dscho's DWIM.\n> \n>     $ git checkout tr/word-diff\n>     Branch tr/word-diff set up to track remote branch tr/word-diff from origin.\n>     Switched to a new branch 'tr/word-diff'\n\nUgh. Right, so _this_ is what kept me from ever learning the proper way:\n\n  (i) If you do `checkout B`, it will track remote branch B if it exists.\n\n  (ii) If you do `checkout -b B`, it will never auto-track anything.\n\n  (iii) If you do `git checkout -t -b B`, it will auto-track your current\n_local_ branch.\n\nThis keeps getting me really confused, I hope I will remember it now for\ngood, but I have seen others having trouble with this as well. I don't\nhave immediate ideas that would do less harm than good to fix this up...\n\nperhaps except changing (iii) to auto-track the remote branch B if it\nexists and require tracked branch name if it doesn't - the current\ndefault seems pretty much useless to me for usual cases. (I can imagine\na scenario where it would be useful, but not a common scenario where\nthis would be useful default.)\n\nP.S.: The \"--track without -b implies branch creation\" sentence in\ngit-checkout(1) seems to be plain wrong?\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nhttp://pasky.or.cz/ | \"Ars longa, vita brevis.\" -- Hippocrates\n"},{"id":"140127","messageId":"m2sk6n7g68.fsf@igel.home","threadId":"23556","inReplyTo":"20100422114924.GH3563@machine.or.cz","subject":"Re: Creating tracked branches","fromName":"Andreas Schwab","fromEmail":"schwab@linux-m68k.org","sentAt":"2010-04-22T13:47:11Z","receivedAt":"2010-04-22T13:47:11Z","isPatch":false,"sender":{"key":"schwab@linux-m68k.org","avatar":"https://avatars.githubusercontent.com/u/2175493?v=4"},"body":"Petr Baudis <pasky@suse.cz> writes:\n\n> P.S.: The \"--track without -b implies branch creation\" sentence in\n> git-checkout(1) seems to be plain wrong?\n\n$ git branch -r\n  origin/HEAD -> origin/master\n  origin/html\n  origin/maint\n  origin/man\n  origin/master\n  origin/next\n  origin/pu\n  origin/todo\n$ git checkout -t origin/maint\nBranch maint set up to track remote branch maint from origin.\nSwitched to a new branch 'maint'\n\nAndreas.\n\n-- \nAndreas Schwab, schwab@linux-m68k.org\nGPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5\n\"And now for something completely different.\"\n"},{"id":"140132","messageId":"20100422141721.GK3563@machine.or.cz","threadId":"23556","inReplyTo":"m2sk6n7g68.fsf@igel.home","subject":"Re: Creating tracked branches","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2010-04-22T14:17:21Z","receivedAt":"2010-04-22T14:17:21Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"On Thu, Apr 22, 2010 at 03:47:11PM +0200, Andreas Schwab wrote:\n> Petr Baudis <pasky@suse.cz> writes:\n> \n> > P.S.: The \"--track without -b implies branch creation\" sentence in\n> > git-checkout(1) seems to be plain wrong?\n> \n> $ git checkout -t origin/maint\n> Branch maint set up to track remote branch maint from origin.\n> Switched to a new branch 'maint'\n\nAh! I have not read all the gory details carefully enough. Wonderful,\nso this would be:\n\n>   (i) If you do `checkout B`, it will track remote branch B if it\n> exists.\n> \n>   (ii) If you do `checkout -b B`, it will never auto-track anything.\n> \n>   (iii) If you do `git checkout -t -b B`, it will auto-track your\n> current _local_ branch.\n\n  (iv) If you do `git checkout -t R`, it will track branch R, deriving\nlocal branch name B from it.\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nhttp://pasky.or.cz/ | \"Ars longa, vita brevis.\" -- Hippocrates\n"},{"id":"140162","messageId":"z2z3abd05a91004221413u6da1bf2ax9c101a27123fd5cc@mail.gmail.com","threadId":"23556","inReplyTo":"7vy6gf52d1.fsf@alter.siamese.dyndns.org","subject":"Re: git pull behavior changed?","fromName":"Aghiles","fromEmail":"aghilesk@gmail.com","sentAt":"2010-04-22T21:13:10Z","receivedAt":"2010-04-22T21:13:10Z","isPatch":false,"sender":{"key":"aghilesk@gmail.com","avatar":null},"body":">\n> Only if you don't count Dscho's DWIM.\n>\n>    $ git checkout tr/word-diff\n>    Branch tr/word-diff set up to track remote branch tr/word-diff from origin.\n>    Switched to a new branch 'tr/word-diff'\n>\n\nDscho's DWIM ? I hope I don't have to learn that to use git efficiently! :)\n\n  -- aghiles\n"}]}