How to alias command in Git Bash for Windows downloaded from git-scm.com ?
I mean Bash commands not Git.
(windows7)
Edit:
Writing aliases i
You can add it manually in the .gitconfig file
[alias]
cm = "commit -m"
Or using the script:
git config --global alias.cm "commit -m"
Here is a screenshot of the .gitconfig
There is two easy way to set the alias.
Using Bash
Open bash terminal and type git command. For instance:
$ git config --global alias.a add
$ git config --global alias.aa 'add .'
$ git config --global alias.cm 'commit -m'
$ git config --global alias.s status
---
---
It will eventually add those aliases on .gitconfig file.
Updating .gitconfig file
Open .gitconfig file located at 'C:\Users\username\.gitconfig' in Windows environment. Then add following lines:
[alias]
a = add
aa = add .
cm = commit -m
gau = add --update
au = add --update
b = branch
---
---