Passing params to git aliases.
authorpatrick nsukami <ndkpatt@gmail.com>
Mon, 21 Sep 2015 21:51:54 +0000 (21:51 +0000)
committerpatrick nsukami <ndkpatt@gmail.com>
Mon, 21 Sep 2015 21:51:54 +0000 (21:51 +0000)
.gitconfig

index 1ce6d72..d43b27f 100644 (file)
         rh1 = reset HEAD^ --hard
         rh2 = reset HEAD^^ --hard
 
+        # how to pass params to git aliases
+        my-alias1 = "!f(){ echo \"$@\"; }; f" # define a func, then call the func.
+        my-alias2 = "! date " # call the cmd directly
+
+
 [color]
         ui = always
         branch = auto