{"thread":{"id":"21879","subject":"Approach for collaborative branches","startedAt":"2009-12-06T16:57:10Z","lastAt":"2009-12-06T18:56:01Z","messageCount":3,"participants":["Gary Pickrell","Matthieu Moy"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"129345","messageId":"4B1BE266.2000208@pickrell.com","threadId":"21879","inReplyTo":null,"subject":"Approach for collaborative branches","fromName":"Gary Pickrell","fromEmail":"gary@pickrell.com","sentAt":"2009-12-06T16:57:10Z","receivedAt":"2009-12-06T16:57:10Z","isPatch":false,"sender":{"key":"gary@pickrell.com","avatar":null},"body":"\nMy apologies if this is the wrong place to ask my question.\n\nI've setup a git remote repository and placed the source for a windows \nprogram there.   I'm working on getting it to compile on Ubuntu.  The \ncompilers are different so the code needs to be tweeked to make sure it \ncompiles fine in Ubuntu without breaking anything in Windows.  Great!  \nThis is a situation that calls for git branches, I thought.  Did the \nfollowing:\n\n1) Clone the repository on Ubuntu\n2) Made an Ubuntu branch\n3) Made my changes to the code.  Added files...ect\n4) Used git push origin Ubuntu to push the changes to the repository\n\nI'm unable to see my Ubuntu changes on my windows machine.  How should I \nproceed?\n\nThanks in advance.\n\n    -Gary\n"},{"id":"129346","messageId":"vpqhbs4f2gz.fsf@bauges.imag.fr","threadId":"21879","inReplyTo":"4B1BE266.2000208@pickrell.com","subject":"Re: Approach for collaborative branches","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2009-12-06T17:15:40Z","receivedAt":"2009-12-06T17:15:40Z","isPatch":false,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Gary Pickrell <gary@pickrell.com> writes:\n\n> 1) Clone the repository on Ubuntu\n> 2) Made an Ubuntu branch\n> 3) Made my changes to the code.  Added files...ect\n> 4) Used git push origin Ubuntu to push the changes to the repository\n>\n> I'm unable to see my Ubuntu changes on my windows machine.  How should\n> I proceed?\n\nOn the windows machine, you should do first\n\n  git fetch\n\nthis will tell you about the new branch if you didn't fetch it\nalready. If it's called Ubuntu remotely, it's probably called\norigin/Ubuntu on your local repository after doing a fetch. Therefore,\nyou can now do\n\n  git merge origin/Ubuntu\n\n\nNow, you probably also want your local branch to be named the same way\non both machines. One way to do that is to create a branch \"foo\" on\nthe repository, then on both sides, fetch it and do\n\n  git checkout --track origin/foo\n\nthis will create a local branch foo, and tell git that further \"pull\"\nshould take their changes from origin/foo.\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"129354","messageId":"4B1BFE41.1040905@pickrell.com","threadId":"21879","inReplyTo":"vpqhbs4f2gz.fsf@bauges.imag.fr","subject":"Re: Approach for collaborative branches","fromName":"Gary Pickrell","fromEmail":"gary@pickrell.com","sentAt":"2009-12-06T18:56:01Z","receivedAt":"2009-12-06T18:56:01Z","isPatch":false,"sender":{"key":"gary@pickrell.com","avatar":null},"body":"\nThank you Matthieu,\n\nIt did exactly what I wanted and I wouldn't have figured it out by myself.\n\n    -Gary\n\n\nMatthieu Moy wrote:\n> Gary Pickrell <gary@pickrell.com> writes:\n>\n>   \n>> 1) Clone the repository on Ubuntu\n>> 2) Made an Ubuntu branch\n>> 3) Made my changes to the code.  Added files...ect\n>> 4) Used git push origin Ubuntu to push the changes to the repository\n>>\n>> I'm unable to see my Ubuntu changes on my windows machine.  How should\n>> I proceed?\n>>     \n>\n> On the windows machine, you should do first\n>\n>   git fetch\n>\n> this will tell you about the new branch if you didn't fetch it\n> already. If it's called Ubuntu remotely, it's probably called\n> origin/Ubuntu on your local repository after doing a fetch. Therefore,\n> you can now do\n>\n>   git merge origin/Ubuntu\n>\n>\n> Now, you probably also want your local branch to be named the same way\n> on both machines. One way to do that is to create a branch \"foo\" on\n> the repository, then on both sides, fetch it and do\n>\n>   git checkout --track origin/foo\n>\n> this will create a local branch foo, and tell git that further \"pull\"\n> should take their changes from origin/foo.\n>\n>   \n"}]}