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

Re: [PATCH 0/2] Make it easy to use branch --track on existing branch

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Jan 17, 2010, 14:53 UTC
Message-ID
<vpqska4n5pr.fsf@bauges.imag.fr>
In-Reply-To
<20100117144031.GA20335@Knoppix>
Ilari Liusvaara <ilari.liusvaara@elisanet.fi> writes:
> But If I read the patch correctly, you can't just arbitrarily set the
> tracking branch since the IDs must match.

Yes. The patch really helps when you already have synchronized, or when you haven't already desynchronized your local branch and its upstream.

We could go one step further, and allow the new branch point to be different as long as it has the old point as an ancestor, but that would still be a ref update.

> [*] Yes, I know you can edit .git/config, but I would want "official sounding"
> (read: git remote subcommand) command to edit it (and no, delete & recreate
> doesn't do the right thing).

Having a "git remote subcommand" to do the same thing could help too, but it could just come in addition to my patch.

My patch doesn't introduce new complexity: the command is already there, and the use-case I'm allowing are legitimate. So, it can help to let users run in, and it doesn't harm.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Ilari LiusvaaraNext: Ilari Liusvaara
Message 6 of 7 in “Make it easy to use branch --track on existing branch”
  1. 0/2 Make it easy to use branch --track on existing branchMatthieu Moy, Jan 17, 2010
  2. 1/2 branch: allow creating a branch with same name and same starting point.Matthieu Moy, Jan 17, 2010
  3. Junio C HamanoJan 17, 2010
  4. 2/2 branch: warn and refuse to set a branch as a tracking branch of itself.Matthieu Moy, Jan 17, 2010
  5. Ilari LiusvaaraJan 17, 2010
  6. Matthieu MoyJan 17, 2010
  7. Ilari LiusvaaraJan 17, 2010

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.