On 2 June 2015 at 15:25, Jay Braun <lyngw...@gmail.com> wrote:
> A colleague in another city and I are working on the same project, with a
> GitHub repository to synch up, i.e., we push to, and pull/fetch from the
> remote GitHub repository.
> I created a branch the other day.  Let's say I was in 'maintrunk'.  I
> entered:
> git checkout -b temporary
> and made some changes in 'temporary' which is a terminal branch to support a
> specific temporary usage.
> From this point, 1) what is the simplest way for me to get the GitHub repo
> synched with 'temporary' and 2) what is the simplest way for him to bring
> over 'temporary' without touching his local version of 'maintrunk'?  For
> example, at what point should he do a 'git checkout'?  Should he do a 'git
> checkout -b' to create the new branch in his local repo, or rely on a fetch
> or pull?

It sounds like you want to expose the new branch to him so then you use `push`:

    % git push origin temporary

at the next `git fetch` people will see that branch locally and they
can check it out using

    % git checkout -b temporary origin/temporary

If you don't want to expose the branch itself you can simply merge it
locally to `master` and then push it:

    % git co master
    % git merge temporary
    % git push

Other's will see that change just as normal, but won't know that you
ever had a branch named `temporary`.  If they use `git fetch` they
will see your changes, but not merge them in (`git pull` is basically
a `git fetch` followed by a `git merge`).

Hope that answers your questions.


Magnus Therning                      OpenPGP: 0xAB4DFBA4
email: mag...@therning.org   jabber: mag...@therning.org
twitter: magthe               http://therning.org/magnus

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to