git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Tracking a remote branch in git

From
TMTim Mazid <timmazid@hotmail.com>
Date
Oct 30, 2009, 00:26 UTC
Message-ID
<26123156.post@talk.nabble.com>
In-Reply-To
<26119537.post@talk.nabble.com>
Sips wrote:
Show 12 quoted lines
> 
> 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 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?
> 

Have you tried doing 'git fetch'? That should get and track all new remote branches automatically.

Once you have a remote branch, if you've deleted the local branch, you can just do 'git branch LOCAL REMOTE', and that should set up a tracking branch.

If this doesn't work for you, check your git version with 'git --version'. It works for v1.6.5.2.

Good luck, Tim.

-- 
View this message in context: http://www.nabble.com/Tracking-a-remote-branch-in-git-tp26119537p26123156.html
Sent from the git mailing list archive at Nabble.com.
Previous: Sips
Message 2 of 2 in “Tracking a remote branch in git”
  1. SipsOct 29, 2009
  2. Tim MazidOct 30, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.