I am trying to change an alias that I created via

git config --global alias.ci commit

to

git config --global alias.ci commit -m

so that I don't have to type it out and to just give the commit a short message each time I do commit.

I just migrated from Windows to Mac, and this alias does work on Windows for me. I wonder if it will work on Mac (I assume), and if so: Where can I find the file where these configurations are stored to change them?

link|improve this question

feedback

1 Answer

up vote 2 down vote accepted

Have a look at the [alias]-section in your ~/.gitconfig-File.

You should find something like

[alias]
    ci = commit

which you can change to

[alias]
    ci = commit -m

When using git config to change aliases, make sure to put quotes round the command you want to alias if necessary:

git config --global alias.ci "commit -m"
link|improve this answer
Thanks Jens!. That was easy – Nik Nov 4 '11 at 1:54
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.