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

Re: Wishlist for branch management

From
Petr Baudis <pasky@suse.cz>
Date
Feb 1, 2010, 09:19 UTC
Message-ID
<20100201091907.GJ9553@machine.or.cz>
In-Reply-To
<4B662BEF.7040503@zytor.com>
On Sun, Jan 31, 2010 at 05:18:39PM -0800, H. Peter Anvin wrote:
Show 6 quoted lines
> A wishlist for better handling of branches:
> 
> git clone --branches
> 
> ... git clone, with the additional step of setting up local branches for
> each one of the remote branches.

Yes please! ;-) However, there should be a corresponding command to do this with a remote within existing repository. Perhaps something like

	git remote populate
(stealing some syntax from topgit ;-).
> git branch --current
> 
> ... list the current branch name, for use in scripts.  Equivalent to:
> 	"git branch | grep '^\*' | cut -c3-"

I'm used to git symbolic-ref HEAD. I like the fact that human-friendly and scripting interfaces are mostly separated to different commands. This also has saner behaviour when HEAD is not on a branch. (Which is also a reason why operation like this should be done only when there's a damn good reason to need to know the branch name.)

> git push --current
> 
> ... push the current branch, and only the current branch...

Yes. Even in the HEAD form, it would be nice to have something that does not require me to write out 'origin' or whatever my remote default is. Perhaps `git push - HEAD`. There's certain disparity, we have an alias for the current branch (HEAD) but not for the current remote.

P.S.: I know. It's all just bikeshedding without patches...
-- 
				Petr "Pasky" Baudis
If you can't see the value in jet powered ants you should turn in
your nerd card. -- Dunbal (464142)
Previous: H. Peter AnvinNext: H. Peter Anvin
Message 4 of 5 in “Wishlist for branch management”
  1. H. Peter AnvinFeb 1, 2010
  2. Björn SteinbrinkFeb 1, 2010
  3. H. Peter AnvinFeb 1, 2010
  4. Petr BaudisFeb 1, 2010
  5. H. Peter AnvinFeb 1, 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.