Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can a git alias have a period (.) in its name?

Tags:

git

alias

I find myself often typing git st . (where st is already aliased to status) to get the status of just the current directory's files.

I often mistype that as git st. which of course doesn't get recognized.

I'd love to be able to alias st. but it doesn't seem like I can. If I add st. = status . to my .gitconfig aliases, I get a fatal: bad config file error on git invocations.

Is it possible to create an alias with a period in it?

like image 548
Aseem Kishore Avatar asked Dec 15 '22 21:12

Aseem Kishore


1 Answers

No, this is not possible (without changing and recompiling Git itself). From the git-config documentation:

The variable names are case-insensitive, allow only alphanumeric characters and -, and must start with an alphabetic character.

like image 163
Greg Hewgill Avatar answered Dec 27 '22 13:12

Greg Hewgill