git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sips <kirillosipov@msn.com>
To: git@vger.kernel.org
Subject: Tracking a remote branch in git
Date: Thu, 29 Oct 2009 12:45:46 -0700 (PDT)	[thread overview]
Message-ID: <26119537.post@talk.nabble.com> (raw)


Hello everyone.
My git setup is as follows:

One local repository residing at D:\Dev\ProjectName
One remote repository residing at W:\ProjectName

W is actually a removable disk.

Now, both repositories are connected through remotes. For example, git
remote -v in the local repository gives:

storengo    W:\ProjectName (fetch)
storengo    W:\ProjectName (push)

The same command in the remote repository gives:

origin    D:\Dev\ProjectName (fetch)
origin    D:\Dev\ProjectName (push)

Obviously, when I am in the master branch, I can synchronize repositories
between each other through git push and git pull.

Then I created a branch in the repository on the removable drive W and named
it newfeature. The question is: How can I work with this branch on the local
repository as well? I mean, I need the same 'relationship' between branches
as in case of the master branch.

I tried the following command on the local repository (which was checked out
to the master branch at that time):

git branch --track newfeature storengo/newfeature,

but received an error fatal: Not a valid object name: 'storengo/newfeature'.

With this command I was hoping to create a local branch which would be
'connected' to the same remote branch. As I've said, no luck there.
Strangely, the following command works without errors:

git branch --track newfeature storengo/master.

I mean, I am able to track the master branch from the remote repository. Why
can't I track some other branch as well? Any ideas what I'm doing wrong?

Thanks,
Kirill
-- 
View this message in context: http://www.nabble.com/Tracking-a-remote-branch-in-git-tp26119537p26119537.html
Sent from the git mailing list archive at Nabble.com.

             reply	other threads:[~2009-10-29 19:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-29 19:45 Sips [this message]
2009-10-30  0:26 ` Tracking a remote branch in git Tim Mazid

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=26119537.post@talk.nabble.com \
    --to=kirillosipov@msn.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).