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

Re: [RFC/PATCH] git push usability improvements and default change

From
Finn Arne Gangstad <finnag@pvv.org>
Date
Mar 12, 2009, 10:22 UTC
Message-ID
<20090312102243.GA27665@pvv.org>
In-Reply-To
<20090312120109.6117@nanako3.lavabit.com>
On Thu, Mar 12, 2009 at 12:01:09PM +0900, Nanako Shiraishi wrote:
[...]
Show 5 quoted lines
> There can be two reasons you may want to give the branch a name other than 'next':
> 
> 1. Because you also have dschos-next that tracks remotes/dscho/next; or
> 
> 2. Because you also have junios-next2 that also tracks remotes/origin/next.
> The first case indicates that the project is using a workflow where
> each developer has his own publishing repository [1], and it is very
> unlikely that Finn Arne has push access to either your or
> Johannes'es public repositories.

No, think more of different repositories with different function, such as "my-public", "my-group", "beta", "customers", "public" and so on. You can have multiple repositories with different function. They (can) have branches with the same name, but have different purposes. To track more than one you _must_ rename at least one locally (and just with two remotes "master" is going to give you some issues).

Maybe you want the name in the public repo to be different than the name in your own repo.

[...]
> I don't understand how the new "--current" makes "sort-of" sense. It
> looks like it is making the command more complex and the only thing
> it does is to encourage a confused workflow.

The naming --current was not good, so I have changed it to --tracking in my latest suggestion. Why is it confused? Why do I need to call my branch locally the same as it is named remotely? That does not scale. Branch names are unique per repository, not globally.

I want to be able to "git pull" and then "git push --tracking" back to the same branch, not push somewhere else. Curently this requires a surprisingly complicated shellscript, and is not available from the guis.

> [1] Your http://gitster.livejournal.com/30645.html showed different
> ways to collaborate very nicely. I think this is the third approach
> in your article.

The main problem with all these examples is that the underlying assumption is that you can always use the same branch name locally and remotely. This just isn't always the case when you have many remotes, and each remote repository has some implicit function (e.g. "beta", "john", "graphics-group", "my-public", .....), and they have an active "master" branch for example.

- Finn Arne
Previous: Nanako ShiraishiNext: Miles Bader
Message 23 of 31 in “git push usability improvements and default change”
  1. git push usability improvements and default changeFinn Arne Gangstad, Mar 9, 2009
  2. 1/7 remote: Make "-" an alias for the current remoteFinn Arne Gangstad, Mar 9, 2009
  3. 2/7 New config option push.defaultFinn Arne Gangstad, Mar 9, 2009
  4. 3/7 git push: New options --matching and --currentFinn Arne Gangstad, Mar 9, 2009
  5. Daniel BarkalowMar 9, 2009
  6. Finn Arne GangstadMar 10, 2009
  7. 4/7 git push: Display warning on unconfigured default pushFinn Arne Gangstad, Mar 9, 2009
  8. Jay SoffianMar 10, 2009
  9. 5/7 git push: Document that "nothing" is the future push defaultFinn Arne Gangstad, Mar 9, 2009
  10. 6/7 git push: Change default for "git push" to nothing.Finn Arne Gangstad, Mar 9, 2009
  11. 7/7 git push: Remove warning for "git push" default changeFinn Arne Gangstad, Mar 9, 2009
  12. Johannes SchindelinMar 9, 2009
  13. Junio C HamanoMar 10, 2009
  14. Finn Arne GangstadMar 10, 2009
  15. Johannes SchindelinMar 10, 2009
  16. Finn Arne GangstadMar 10, 2009
  17. Junio C HamanoMar 10, 2009
  18. Junio C HamanoMar 10, 2009
  19. Finn Arne GangstadMar 10, 2009
  20. Jay SoffianMar 10, 2009
  21. Junio C HamanoMar 11, 2009
  22. Nanako ShiraishiMar 12, 2009
  23. Finn Arne GangstadMar 12, 2009
  24. Miles BaderMar 12, 2009
  25. Finn Arne GangstadMar 12, 2009
  26. Miles BaderMar 13, 2009
  27. John TapsellMar 13, 2009
  28. Jeff KingMar 10, 2009
  29. Finn Arne GangstadMar 10, 2009
  30. Jeff KingMar 10, 2009
  31. Jay SoffianMar 11, 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.