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

Re: [RFC PATCH 0/4] Add alias option to git branch

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 5, 2019, 13:21 UTC
Message-ID
<xmqqa7i9v4mv.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<47CA9077-E8C1-4093-8B36-2D5D3DE2D886@gmail.com>
Kenneth Cochran <kenneth.cochran101@gmail.com> writes:
Show 7 quoted lines
> From c1bad54b29ae1c1d8548d248f6ecaa5959e55f7b Mon Sep 17 00:00:00 2001
> From: Kenneth Cochran <kenneth.cochran101@gmail.com>
> Date: Mon, 4 Mar 2019 09:40:22 -0600
> Subject: [RFC PATCH 0/4] Add alias option to git branch
> Cc: Sahil Dua <sahildua2305@gmail.com>,
>     Duy Nguyen <pclouds@gmail.com>,
>     Jeff King <peff@peff.net>
Avoid using these in-body headers.

Reader's MUA won't show this "Subject:", but instead show the same "Add alias option to gir branch", among hundreds of mailing list messages, making it very tempting to ignore these four messages.

Show 6 quoted lines
> I find myself often using git symbolic-ref to get around work requirements to use branch names that are not very human friendly.
> There are a few problems with this:
> 	- There’s a lot of text to type
> 	- Mistyping certain parts (heads/refs) will do things other than create a branch alias
> 	- It will happily overwrite an existing branch
> 	- Deleting one that is checked out will put HEAD in an invalid state.
Meh.

All of the above are problems _you_ create by trying to use symbolic refs. If the project wants to use an overlong branch name, using it with "git branch" or "git checkout" or whatever would be a much better solution. Command-line completion will complete long branch names, and "git branch overly-long-name-of-an-existing-branch" will not overwrite an existing branch (without --force). "git branch -d overly-long-name-of-an-existing-branch" would not delete an checked-out branch, either.

Previous: Kenneth CochranNext: Kenneth Cochran
Message 7 of 11 in “Add alias option to git branch”
  1. 0/4 Add alias option to git branchKenneth Cochran, Mar 4, 2019
  2. Kenneth CochranMar 4, 2019
  3. Kenneth CochranMar 4, 2019
  4. Kenneth CochranMar 4, 2019
  5. Kenneth CochranMar 4, 2019
  6. Kenneth CochranMar 4, 2019
  7. Junio C HamanoMar 5, 2019
  8. Kenneth CochranMar 5, 2019
  9. Phil SaintyMar 6, 2019
  10. Phil SaintyMar 4, 2019
  11. Kenneth CochranMar 4, 2019

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.