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

Re: setting up tracking on push

From
Jay Soffian <jaysoffian@gmail.com>
Date
Mar 11, 2009, 01:52 UTC
Message-ID
<76718490903101852y2c90e0abi8e0e4f71e6f0bc52@mail.gmail.com>
In-Reply-To
<20090310230939.GB14083@sigio.peff.net>
On Tue, Mar 10, 2009 at 7:09 PM, Jeff King <peff@peff.net> wrote:
Show 19 quoted lines
> 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.
Previous: Jeff KingNext: Jeff King
Message 11 of 38 in “setting up tracking on push”
  1. Miles BaderMar 6, 2009
  2. John TapsellMar 6, 2009
  3. Jay SoffianMar 6, 2009
  4. Johannes SchindelinMar 6, 2009
  5. Miles BaderMar 6, 2009
  6. Jeremy O'BrienMar 6, 2009
  7. Jay SoffianMar 6, 2009
  8. Miles BaderMar 6, 2009
  9. Marc BranchaudMar 10, 2009
  10. Jeff KingMar 10, 2009
  11. Jay SoffianMar 11, 2009
  12. Jeff KingMar 11, 2009
  13. Jay SoffianMar 11, 2009
  14. Jeff KingMar 11, 2009
  15. Jay SoffianMar 11, 2009
  16. Jay SoffianMar 11, 2009
  17. Jeff KingMar 11, 2009
  18. Jay SoffianMar 11, 2009
  19. Jakub NarebskiMar 24, 2009
  20. Junio C HamanoMar 11, 2009
  21. Miles BaderMar 11, 2009
  22. Miles BaderMar 11, 2009
  23. Jay SoffianMar 11, 2009
  24. Marc BranchaudMar 11, 2009
  25. Jeff KingMar 11, 2009
  26. Nanako ShiraishiMar 11, 2009
  27. Jeff KingMar 11, 2009
  28. John M. DlugoszMar 12, 2009
  29. Jay SoffianMar 12, 2009
  30. Junio C HamanoMar 12, 2009
  31. Jay SoffianMar 12, 2009
  32. Jay SoffianMar 12, 2009
  33. Jay SoffianMar 12, 2009
  34. John M. DlugoszMar 15, 2009
  35. Jay SoffianMar 15, 2009
  36. John M. DlugoszMar 16, 2009
  37. Jay SoffianMar 16, 2009
  38. Junio C HamanoMar 15, 2009

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.