[Question] Fetching a new branch from remote

From: Carl Baldwin <hidden>
Date: 2016-06-15 22:42:13

Greetings,

I have a short question about git fetch.  Say there is a new branch,
call it 'new-branch' in a remote repository.  I am interested in this
branch and want to fetch it to 'new-branch' in my local to track its
progress.

I would expect this to do it:

% git fetch -f <url> new-branch

But, it doesn't.

Actually, I just noticed that this accomplishes the desired result...

% git fetch <url> new-branch:new-branch

I also just noticed that the man pages only says that '-f' works on
tags.  Should it work on branches?  Either way, it wasn't clear to me
how to fetch a new branch from a remote and store it under the same name
locally.  In my opinion, git fetch -f should do this if given a
branchname from the remote.

Carl

-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 Carl Baldwin                        Systems VLSI Laboratory
 Hewlett Packard Company
 MS 88                               work: 970 898-1523
 3404 E. Harmony Rd.                 work: Carl.N.Baldwin@hp.com
 Fort Collins, CO 80525              home: Carl@ecBaldwin.net
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help