git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Approach for collaborative branches
@ 2009-12-06 16:57 Gary Pickrell
  2009-12-06 17:15 ` Matthieu Moy
  0 siblings, 1 reply; 3+ messages in thread
From: Gary Pickrell @ 2009-12-06 16:57 UTC (permalink / raw)
  To: git


My apologies if this is the wrong place to ask my question.

I've setup a git remote repository and placed the source for a windows 
program there.   I'm working on getting it to compile on Ubuntu.  The 
compilers are different so the code needs to be tweeked to make sure it 
compiles fine in Ubuntu without breaking anything in Windows.  Great!  
This is a situation that calls for git branches, I thought.  Did the 
following:

1) Clone the repository on Ubuntu
2) Made an Ubuntu branch
3) Made my changes to the code.  Added files...ect
4) Used git push origin Ubuntu to push the changes to the repository

I'm unable to see my Ubuntu changes on my windows machine.  How should I 
proceed?

Thanks in advance.

    -Gary

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Approach for collaborative branches
  2009-12-06 16:57 Approach for collaborative branches Gary Pickrell
@ 2009-12-06 17:15 ` Matthieu Moy
  2009-12-06 18:56   ` Gary Pickrell
  0 siblings, 1 reply; 3+ messages in thread
From: Matthieu Moy @ 2009-12-06 17:15 UTC (permalink / raw)
  To: Gary Pickrell; +Cc: git

Gary Pickrell <gary@pickrell.com> writes:

> 1) Clone the repository on Ubuntu
> 2) Made an Ubuntu branch
> 3) Made my changes to the code.  Added files...ect
> 4) Used git push origin Ubuntu to push the changes to the repository
>
> I'm unable to see my Ubuntu changes on my windows machine.  How should
> I proceed?

On the windows machine, you should do first

  git fetch

this will tell you about the new branch if you didn't fetch it
already. If it's called Ubuntu remotely, it's probably called
origin/Ubuntu on your local repository after doing a fetch. Therefore,
you can now do

  git merge origin/Ubuntu


Now, you probably also want your local branch to be named the same way
on both machines. One way to do that is to create a branch "foo" on
the repository, then on both sides, fetch it and do

  git checkout --track origin/foo

this will create a local branch foo, and tell git that further "pull"
should take their changes from origin/foo.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Approach for collaborative branches
  2009-12-06 17:15 ` Matthieu Moy
@ 2009-12-06 18:56   ` Gary Pickrell
  0 siblings, 0 replies; 3+ messages in thread
From: Gary Pickrell @ 2009-12-06 18:56 UTC (permalink / raw)
  To: Matthieu Moy; +Cc: git


Thank you Matthieu,

It did exactly what I wanted and I wouldn't have figured it out by myself.

    -Gary


Matthieu Moy wrote:
> Gary Pickrell <gary@pickrell.com> writes:
>
>   
>> 1) Clone the repository on Ubuntu
>> 2) Made an Ubuntu branch
>> 3) Made my changes to the code.  Added files...ect
>> 4) Used git push origin Ubuntu to push the changes to the repository
>>
>> I'm unable to see my Ubuntu changes on my windows machine.  How should
>> I proceed?
>>     
>
> On the windows machine, you should do first
>
>   git fetch
>
> this will tell you about the new branch if you didn't fetch it
> already. If it's called Ubuntu remotely, it's probably called
> origin/Ubuntu on your local repository after doing a fetch. Therefore,
> you can now do
>
>   git merge origin/Ubuntu
>
>
> Now, you probably also want your local branch to be named the same way
> on both machines. One way to do that is to create a branch "foo" on
> the repository, then on both sides, fetch it and do
>
>   git checkout --track origin/foo
>
> this will create a local branch foo, and tell git that further "pull"
> should take their changes from origin/foo.
>
>   

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-12-06 18:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-06 16:57 Approach for collaborative branches Gary Pickrell
2009-12-06 17:15 ` Matthieu Moy
2009-12-06 18:56   ` Gary Pickrell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).