X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;ds=sidebyside;f=git-wiki.txt;fp=git-wiki.txt;h=c1a831a94c77c0e585be299e52e07c0bb879e8db;hb=08ff71dcde3af9361d87583c8de78f72737b0bee;hp=57ba2841df3073409166f467b39f2fb573662915;hpb=9aa2facfd9f4ac3ca5a4c68a97533d0c0e56043e;p=git-wiki.git diff --git a/git-wiki.txt b/git-wiki.txt index 57ba284..c1a831a 100644 --- a/git-wiki.txt +++ b/git-wiki.txt @@ -756,6 +756,29 @@ See `WhatIsTheIndex Wiki. +Aliases +------- + +Recursive aliases +''''''''''''''''' + +Git doesn't allow recursive aliases. The expansion of an alias is +interpreted by git as a builtin command. I.e., in the following example +alias ``com`` doesn't work because there is no builtin command ``git +ci``:: + + [alias] + ci = commit + com = ci + +You can trick git by using shell. The following example works albeit a +bit slow:: + + [alias] + ci = commit + com = !git ci + + Root ----