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
PSPhil Sainty <psainty@orcon.net.nz>
Date
Mar 6, 2019, 10:13 UTC
Message-ID
<b490c79b-37e0-7c6d-8643-3ec2343411ac@orcon.net.nz>
In-Reply-To
<CAJ145vW3HPaP2GeSL65q5C1XhYpiE+7=apU1ia=17eNWPfRj_g@mail.gmail.com>

I can only concur about the genuine usefulness of symbolic refs as branch aliases. I wrote my shell script for this 5 years ago, and I've made use of the facility almost every working day since.

I jump around branches frequently, and my feature branch names always start with an issue/bug number followed by a short description -- which is perfect for listings and seeing at a glance what a branch is about, and terrible for tab-completion.

Those long branch names are useful and informative for the developers on the project, but being able to also have a 2-3 letter alias in my working copy for the lifetime of a branch -- something which is trivial for me to remember and type -- gives me the best of both worlds, and I find it to be a tremendous convenience.

It's really not dissimilar to why so many people find shell aliases to be so handy.

The nice thing is that all the plumbing is already there and working. I've used it happily for 5 years, and other people use it similarly. This feature just adds some protective porcelain over it, so that people can more easily make use of the existing benefits without any of the potential dangers.

-Phil
Previous: Kenneth CochranNext: Phil Sainty
Message 9 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.