Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get git commands list

Tags:

git

bash

I would like to make an alias for every git command.

As there are many of them, I would like to get them on a list to then make a loop in my .bashrc.

Is there any way to get them in shell script?

like image 566
Aracthor Avatar asked Sep 19 '25 09:09

Aracthor


2 Answers

You could try this:

git help -a

Alternatively, your git commands are listed in the <git-core directory>:

ls -1 <git-core-directory>
like image 119
Eugeniu Rosca Avatar answered Sep 21 '25 21:09

Eugeniu Rosca


git --list-cmds=builtins,main,others

man git:

   --list-cmds=group[,group...]
       List commands by group. This is an internal/experimental
       option and may change or be removed in the future.
like image 40
Guildenstern Avatar answered Sep 21 '25 21:09

Guildenstern