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

Re: default aliases (ci, di, st, co)

From
Matthieu Moy <matthieu.moy@imag.fr>
Date
Jul 9, 2009, 09:12 UTC
Message-ID
<vpqy6qycj9l.fsf@bauges.imag.fr>
In-Reply-To
<h34bms$8to$1@ger.gmane.org>
Graeme Geldenhuys <graemeg@gmail.com> writes:
Show 11 quoted lines
> Ondrej Certik wrote:
>> [alias]
>>     ci = commit
>>     di = diff --color-words
>>     st = status
>>     co = checkout
>>
>
> I also gave from SVN and I must admit, I did create co, st, ci
> aliases, but basically never used them, so removed them since. Git is
> not SVN, so why treat it as such.

co is indeed particularly nasty. Yes, it's common for cvs/svn old-timers, but "co" is a prefix of "COmmit", and means "CheckOut". That's really misleading.

And the problem with aliases is that although they are good for personnal use, they become bad when people use them publicly : either in mail messages or in scripts. Ask about something that requires "git commit" on the Git mailing list, everybody will be talking about "git commit", not one about "git ci", the other about "git checkin" and the last one about "git commit". That's far less misleading (yes, the example is oversimplified, but if I advise someone to use "git diff --color-words", he/she understands what I'm talking about immediately, while if I advise "git di", it requires more time).

One thing I'd like to see is a wizard that creates a ~/.gitconfig with this section commented out when it does not exist, like

[alias] # Aliases, uncomment the lines to use them. # ci = commit # di = diff --color-words

To reduce the effort of people willing to use aliases, without making them totally official.

-- 
Matthieu
Previous: Graeme GeldenhuysNext: Andreas Ericsson
Message 17 of 19 in “default aliases (ci, di, st, co)”
  1. Ondrej CertikJul 8, 2009
  2. Jakub NarebskiJul 9, 2009
  3. Graeme GeldenhuysJul 9, 2009
  4. Junio C HamanoJul 9, 2009
  5. Paolo BonziniJul 9, 2009
  6. Jeff KingJul 13, 2009
  7. Jeff KingJul 13, 2009
  8. Paolo BonziniJul 13, 2009
  9. Andreas EricssonJul 9, 2009
  10. Michael J GruberJul 9, 2009
  11. Graeme GeldenhuysJul 9, 2009
  12. Jakub NarebskiJul 9, 2009
  13. Michael J GruberJul 9, 2009
  14. Luciano Miguel Ferreira RochaJul 9, 2009
  15. Ondrej CertikJul 12, 2009
  16. Graeme GeldenhuysJul 9, 2009
  17. Matthieu MoyJul 9, 2009
  18. wsfix aliasAndreas Ericsson, Jul 9, 2009
  19. Larry D'AnnaJul 9, 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.