Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
add comment

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"
share|improve this answer
    
Thanks Jens!. That was easy –  Nik Nov 4 '11 at 1:54
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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