git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jacob Helwig <jacob.helwig@gmail.com>
To: Robert Buck <buck.robert.j@gmail.com>
Cc: "git@vger.kernel.org List" <git@vger.kernel.org>
Subject: Re: how do I create a branch and push it so several developers can share work?
Date: Wed, 8 Sep 2010 15:40:41 -0700	[thread overview]
Message-ID: <20100908224041.GB8466@vfa-6z.perlninja.com> (raw)
In-Reply-To: <AANLkTinO9TVyg6EBS1ZuQPS+VWxzODmLan0sDGzFw8eh@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1610 bytes --]

On Wed, 08 Sep 2010 18:31:30 -0400, Robert Buck wrote:
> 
> We just switched over to git and also use gitolite.
> 
> To create a new branch and push it so a team of developers can
> collaborate on that branch I performed the following commands:
> 
> Listed available tags:
> git fetch --tags
> 
> Listed available branches, which for me only showed one, master:
> git branch
> 
> Created the branch off the tag:
> git branch fullers tagduvel
> 
> Checked out the branch to verify the contents:
> git checkout fullers
> ...
> 
> Push the branch to the remote repository:
> git push origin fullers
> 
> Now, when I clone the repository and list the branches I only see
> 'master'. If I list the branches with the -a option I see something I
> did not anticipate:
> git branch -a
> * master
>   remotes/origin/HEAD -> origin/master
>   remotes/origin/duvel
>   remotes/origin/fullers
>   remotes/origin/master
> 
> What I had expected was a fullers branch.
> 
> So apparently I did something very wrong here. What did I do wrong?
> 
> Thanks,
> 
> Bob

You didn't do anything wrong at all.  That's exactly what I'd expect to
see at the end.  Git doesn't automatically create local branches (the
ones without remotes/.../ in front) for any branches other than the one
pointed to by remotes/origin/HEAD.

The other developers will still have your fullers branch available to
them, but if they want to do any work on it, they'll need to do
something like "git checkout -b fullers origin/fullers" to create a
local branch, which they can modify.

-- 
Jacob Helwig

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 665 bytes --]

  reply	other threads:[~2010-09-08 22:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-08 22:31 how do I create a branch and push it so several developers can share work? Robert Buck
2010-09-08 22:40 ` Jacob Helwig [this message]
2010-09-08 23:01   ` Robert Buck
2010-09-09  5:36     ` Miles Bader

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100908224041.GB8466@vfa-6z.perlninja.com \
    --to=jacob.helwig@gmail.com \
    --cc=buck.robert.j@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).