Thread (1 message) 1 message, 1 author, 2016-06-15

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

From: Matthieu Moy <hidden>
Date: 2016-06-15 22:47:02

Graeme Geldenhuys [off-list ref] writes:
Ondrej Certik wrote:
quoted
[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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help