From: Matthieu Moy Date: Tue, 19 Jan 2010 07:22:26 GMT Subject: Re: [PATCH 1/2] Add branch --set-upstream Message-ID: In-Reply-To: <1263847452-29634-2-git-send-email-ilari.liusvaara@elisanet.fi> Ilari Liusvaara writes: > Add --set-upstream option to branch that works like --track, except that > when branch exists already, its upstream info is changed without changing > the ref value. > > Based-on-patch-from: Matthieu Moy > Signed-off-by: Matthieu Moy I'm short on Git time budget, so I happily let you take over on this patch. I'm a bit worried about the vocabulary: my understanding is that "--track" is considered confusing, and should have been called "--set-upstream" since the beginning. With your patch, we have both --set-upstream and --track, with different meanings. Should we consider --track as semi-deprecated, and --set-upstream as "--track done right"? If so, you can consider squashing this to promote your option instead of --track, and perhaps reword git-branch.txt so that --track says it does like --set-upstream, and not the other way around. diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt index b169836..4c66f19 100644 --- a/Documentation/user-manual.txt +++ b/Documentation/user-manual.txt @@ -2114,12 +2114,12 @@ linkgit:git-fetch[1] to keep them up-to-date; see Now create the branches in which you are going to work; these start out at the current tip of origin/master branch, and should be set up (using -the --track option to linkgit:git-branch[1]) to merge changes in from +the --set-upstream option to linkgit:git-branch[1]) to merge changes in from Linus by default. ------------------------------------------------- -$ git branch --track test origin/master -$ git branch --track release origin/master +$ git branch --set-upstream test origin/master +$ git branch --set-upstream release origin/master ------------------------------------------------- These can be easily kept up to date using linkgit:git-pull[1]. -- Matthieu Moy http://www-verimag.imag.fr/~moy/