Skip to content

Configuration of aliases

Florian Merle edited this page Oct 1, 2018 · 4 revisions

It is possible to get some aliases on git. It is very easier and handy. Imagine you want to create an alias for the commiting.

Create an alias

Run in your git project

git config --global alias.ci 'commit -m'

Now instead of running git commit -m "2 - Added game service" you can run git ci "2 - Added game service".

Where is the configuration file ?

The configuration file is located in your home (~/.gitconfig). You can directly edit this file by adding an alias section.

Useful aliases

graph = log --all --decorate --oneline --graph
dc = diff --cached
st = status
df = diff
co = checkout
ci = commit -m
br = branch
logo = log --oneline
dcc = diff --cached --color-words
cb = checkout -b
dev = checkout develop
pa = pull --all
rpo = remote prune origin
Clone this wiki locally