{"thread":{"id":"25044","subject":"how do I create a branch and push it so several developers can share work?","startedAt":"2010-09-08T22:31:30Z","lastAt":"2010-09-09T05:36:30Z","messageCount":4,"participants":["Robert Buck","Jacob Helwig","Miles Bader"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"150328","messageId":"AANLkTinO9TVyg6EBS1ZuQPS+VWxzODmLan0sDGzFw8eh@mail.gmail.com","threadId":"25044","inReplyTo":null,"subject":"how do I create a branch and push it so several developers can share work?","fromName":"Robert Buck","fromEmail":"buck.robert.j@gmail.com","sentAt":"2010-09-08T22:31:30Z","receivedAt":"2010-09-08T22:31:30Z","isPatch":false,"sender":{"key":"buck.robert.j@gmail.com","avatar":"https://gravatar.com/avatar/1686742e8ac2595378aac67f26fd638ddaf494194f9af0cb6082c4a7eca1a366?d=mp&s=160"},"body":"We just switched over to git and also use gitolite.\n\nTo create a new branch and push it so a team of developers can\ncollaborate on that branch I performed the following commands:\n\nListed available tags:\ngit fetch --tags\n\nListed available branches, which for me only showed one, master:\ngit branch\n\nCreated the branch off the tag:\ngit branch fullers tagduvel\n\nChecked out the branch to verify the contents:\ngit checkout fullers\n...\n\nPush the branch to the remote repository:\ngit push origin fullers\n\nNow, when I clone the repository and list the branches I only see\n'master'. If I list the branches with the -a option I see something I\ndid not anticipate:\ngit branch -a\n* master\n  remotes/origin/HEAD -> origin/master\n  remotes/origin/duvel\n  remotes/origin/fullers\n  remotes/origin/master\n\nWhat I had expected was a fullers branch.\n\nSo apparently I did something very wrong here. What did I do wrong?\n\nThanks,\n\nBob\n"},{"id":"150330","messageId":"20100908224041.GB8466@vfa-6z.perlninja.com","threadId":"25044","inReplyTo":"AANLkTinO9TVyg6EBS1ZuQPS+VWxzODmLan0sDGzFw8eh@mail.gmail.com","subject":"Re: how do I create a branch and push it so several developers can share work?","fromName":"Jacob Helwig","fromEmail":"jacob.helwig@gmail.com","sentAt":"2010-09-08T22:40:41Z","receivedAt":"2010-09-08T22:40:41Z","isPatch":false,"sender":{"key":"jacob.helwig@gmail.com","avatar":"https://avatars.githubusercontent.com/u/14557?v=4"},"body":"On Wed, 08 Sep 2010 18:31:30 -0400, Robert Buck wrote:\n> \n> We just switched over to git and also use gitolite.\n> \n> To create a new branch and push it so a team of developers can\n> collaborate on that branch I performed the following commands:\n> \n> Listed available tags:\n> git fetch --tags\n> \n> Listed available branches, which for me only showed one, master:\n> git branch\n> \n> Created the branch off the tag:\n> git branch fullers tagduvel\n> \n> Checked out the branch to verify the contents:\n> git checkout fullers\n> ...\n> \n> Push the branch to the remote repository:\n> git push origin fullers\n> \n> Now, when I clone the repository and list the branches I only see\n> 'master'. If I list the branches with the -a option I see something I\n> did not anticipate:\n> git branch -a\n> * master\n>   remotes/origin/HEAD -> origin/master\n>   remotes/origin/duvel\n>   remotes/origin/fullers\n>   remotes/origin/master\n> \n> What I had expected was a fullers branch.\n> \n> So apparently I did something very wrong here. What did I do wrong?\n> \n> Thanks,\n> \n> Bob\n\nYou didn't do anything wrong at all.  That's exactly what I'd expect to\nsee at the end.  Git doesn't automatically create local branches (the\nones without remotes/.../ in front) for any branches other than the one\npointed to by remotes/origin/HEAD.\n\nThe other developers will still have your fullers branch available to\nthem, but if they want to do any work on it, they'll need to do\nsomething like \"git checkout -b fullers origin/fullers\" to create a\nlocal branch, which they can modify.\n\n-- \nJacob Helwig\n"},{"id":"150331","messageId":"AANLkTiknS8vwqWRVn49eaEEbmQ-iqBa6zpgq6Y=nB326@mail.gmail.com","threadId":"25044","inReplyTo":"20100908224041.GB8466@vfa-6z.perlninja.com","subject":"Re: how do I create a branch and push it so several developers can share work?","fromName":"Robert Buck","fromEmail":"buck.robert.j@gmail.com","sentAt":"2010-09-08T23:01:28Z","receivedAt":"2010-09-08T23:01:28Z","isPatch":false,"sender":{"key":"buck.robert.j@gmail.com","avatar":"https://gravatar.com/avatar/1686742e8ac2595378aac67f26fd638ddaf494194f9af0cb6082c4a7eca1a366?d=mp&s=160"},"body":"Thanks Jacob. I thought I had done it right, but when I cloned and did\nnot get what I expected at first, I was a bit concerned. Thanks.\n\nRelated question, is there a way to have fullers show up automatically\nas a local branch for developers simply through a `git clone`?\n\n\n\nOn Wed, Sep 8, 2010 at 6:40 PM, Jacob Helwig <jacob.helwig@gmail.com> wrote:\n> On Wed, 08 Sep 2010 18:31:30 -0400, Robert Buck wrote:\n>>\n>> We just switched over to git and also use gitolite.\n>>\n>> To create a new branch and push it so a team of developers can\n>> collaborate on that branch I performed the following commands:\n>>\n>> Listed available tags:\n>> git fetch --tags\n>>\n>> Listed available branches, which for me only showed one, master:\n>> git branch\n>>\n>> Created the branch off the tag:\n>> git branch fullers tagduvel\n>>\n>> Checked out the branch to verify the contents:\n>> git checkout fullers\n>> ...\n>>\n>> Push the branch to the remote repository:\n>> git push origin fullers\n>>\n>> Now, when I clone the repository and list the branches I only see\n>> 'master'. If I list the branches with the -a option I see something I\n>> did not anticipate:\n>> git branch -a\n>> * master\n>>   remotes/origin/HEAD -> origin/master\n>>   remotes/origin/duvel\n>>   remotes/origin/fullers\n>>   remotes/origin/master\n>>\n>> What I had expected was a fullers branch.\n>>\n>> So apparently I did something very wrong here. What did I do wrong?\n>>\n>> Thanks,\n>>\n>> Bob\n>\n> You didn't do anything wrong at all.  That's exactly what I'd expect to\n> see at the end.  Git doesn't automatically create local branches (the\n> ones without remotes/.../ in front) for any branches other than the one\n> pointed to by remotes/origin/HEAD.\n>\n> The other developers will still have your fullers branch available to\n> them, but if they want to do any work on it, they'll need to do\n> something like \"git checkout -b fullers origin/fullers\" to create a\n> local branch, which they can modify.\n>\n> --\n> Jacob Helwig\n>\n> -----BEGIN PGP SIGNATURE-----\n> Version: GnuPG v1.4.10 (GNU/Linux)\n>\n> iQGcBAEBAgAGBQJMiBDiAAoJEHJabXWGiqEBu1cL+gNCu5BiRFytPSi7IsjPNk81\n> dPO6AX69K1hq22eShO0Li62NPDhM4B8H5aXAlfdtjVLz/VdRrAiuBaW2zX0eUaQ6\n> i7k3vl+QeyDt02UphG9mM8dEYivrh7UUozQ3OVTYitkN5+3kmfg7tw+7pF7+Z6Et\n> LZ7bRUb3pzEaD8sKSKNbqjSpj9bqo2aCdgZFd+fE8yzNDmpE6wQby9vks15IOtPd\n> Skh+SjhmD9yNL6LC3+8989muxXomi2gZvXIcCyBy/ECexeLSTOQGH6JX086TIqus\n> rVKn7UNNncNzB2Q/lY8VM89A7zTyEdFhIbh8xkbEEGPGkGTU3t/TOwANGU0Q3rRO\n> ymNJYLhg9cg+JWnO04f5gTPI66df4J16ctqIEWqBiqK6gm+8/VlLyz2H4yIvxRfW\n> zocPp3ae/JsKIYKAqBPwFaeNgW4mHMmLlnv6Gc96ZscFE66dj5HgwuY80B6pNSqR\n> U3H3VJGWNJsAceByhArsaytrzLURbxqpE4a79IuVIg==\n> =fj56\n> -----END PGP SIGNATURE-----\n>\n>\n"},{"id":"150349","messageId":"buo8w3bsckh.fsf@dhlpc061.dev.necel.com","threadId":"25044","inReplyTo":"AANLkTiknS8vwqWRVn49eaEEbmQ-iqBa6zpgq6Y=nB326@mail.gmail.com","subject":"Re: how do I create a branch and push it so several developers can share work?","fromName":"Miles Bader","fromEmail":"miles@gnu.org","sentAt":"2010-09-09T05:36:30Z","receivedAt":"2010-09-09T05:36:30Z","isPatch":false,"sender":{"key":"miles@gnu.org","avatar":"https://gravatar.com/avatar/01069b69593af7bff28e2f97afeb3644ae6fe2f5f56cb3a8cf34c5fb8c36efe5?d=mp&s=160"},"body":"Robert Buck <buck.robert.j@gmail.com> writes:\n> Related question, is there a way to have fullers show up automatically\n> as a local branch for developers simply through a `git clone`?\n\nHm, can't you have them do \"git clone --branch fullers REMOTE\" ?\n\nI thinnnnnk that does the right thing (does the clone, then makes a\nlocal \"fullers\" branch that tracks the remote \"fullers\" branch).\n\nAFAIK there's no way to get multiple new local branches though\n(e.g. master _and_ fullers)...\n\n-Miles\n\n-- \n(\\(\\\n(^.^)\n(\")\")\n*This is the cute bunny virus, please copy this into your sig so it can spread.\n"}]}