Git Help is used when you don’t remember some git commands or their options.
git help
: This lists some basic, popular Git commands.
git [command] -help
: This is used to find available options for a command.
git help --all
: This brings a list of all possible commands in Git.
git help -g
: This is lists out some concepts in Git along with their meanings.
We will use the git [command] -help
on a popular command, the push
command.
git push -help
Running this git command will list out all the available options that are connected with the push
command.
Below is the result of what to expect when you run this command:
git help -help
?This command looks funny right? This is used when you want to find available options connected with the help
command.
And when it is run, you get the following: