Feature Proposal: Track all branches from a given remote

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello git experts:

Recently, I've encountered the problem where I would like to set my
local repository copy to track all branches on a given remote. There
does not appear to be a switch for this in the git-branch command
currently, however, I will admit that my somewhat limited
understanding of the git-branch manpage might be causing me simply not
to see it.

It seems as though this is a use case that some users of git encounter
now and then, as illustrated by this post:

http://stackoverflow.com/a/6300386/281460

I was thinking that it might be useful to add a new option to git
branch, perhaps something like:

git-branch --track-remote <remotename>

Where <remotename> specifies a given remote, and the command will
track all branches remotes/<remotename>/* to refs/heads/*.

So, for example, if I were to run:

git-branch --track-remote origin

and I had two branches on origin, master and maint, respectively,
after the command finishes, my local repo would now have two branches,
master (set up to track origin/master), and maint (setup to track
origin/maint).

I'm not entirely sure how to handle naming conflicts, for example if
'maint' already existed on another remote, and was set up to track
from that remote previous to this invocation of the command.

If I were to start work on a patch, would there be any interest in
this feature, or are there reasons why it isn't currently implemented?

Thank you,

~Scott Johnson
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]