Dieses Blog durchsuchen

Montag, 10. Oktober 2016

git: add a custom shortcut for long commands

Some commands in git are some kind of complicated. Look at this command:
It will simply print the grap history

git log --oneline --graph --decorate

To shorten that, you can setup a alias.

Prerequisits

We need some things installed on the local machine.
  • git bash installed

Add a shortcut

open a terminal
git config --global alias.hist "git log --oneline --graph --decorate"

This will add an alias "hist" to your git console

You can test it with:
git hist

Keine Kommentare:

Kommentar veröffentlichen