On Tue, Mar 10, 2009 at 7:09 PM, Jeff King <peff@xxxxxxxx> wrote: > On Tue, Mar 10, 2009 at 04:26:03PM -0400, Marc Branchaud wrote: > >> It would be good if the branch command allowed modification of a >> branch's properties. At the very least, branch-creation commands like >> "git branch --track foobranch origin/master" could offer to modify if >> the branch already exists, instead of just quitting. > > I agree that it would be nice if an interface could be made around > "branch --track". However, the problem with > > git branch --track foobranch origin/master > > is that it does two things: it sets up tracking, and it resets the > foobranch ref. Right now we complain if foobranch already exists. We > have a "-f" to override. But what you want to say is "set foobranch to > track origin/master, but _don't_ actually reset where it points". And I > don't see an intuitive way of doing that with that syntax. If you don't > require "-f", then you are silently ignoring half of what the user asked > you to do. Maybe a new switch, say -u for update: -u --track [<branch>] <upstream> Update tracking information for an existing branch. <branch> is optional and defaults to the current branch. <upstream> is the branch you wish to track, e.g. origin/master; normally <upstream> is a remote tracking branch, but specifying a local branch is valid as well. -u --no-track [<branch>] Remove tracking information for an existing branch. <branch> is optional and defaults to the current branch. j. -- 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