Git Help

Git Help

With the Git help of it is easy to use the Git commands.

There are a couple of different ways to use the help command in the command line:

git command -help – See all the available options for the specific command.

git help –all – See all possible commands.

 Let’s seek some different commands.

Git -help See Options for a Specific Command

Example

[user@localhost] $  git commit -help

usage: git commit [] [–] …

 -q, –quiet         suppress summary after a successful commit

 -v, –verbose    show diff in the commit message template

Commit Message Options

-F, --file read message from file
--author overrides author for commit
--date overrides date for commit
-c, --reedit-message reuse and edit messages from the specified commit
-C, --reuse-message reuse message from the specified commit
--fixup use autosquash formatted message to fixup specified commit
--squash use autosquash formatted message to squash specified commit
--reset-author the commit is authored by me now (used with -C/-c/--amend)
-s, --signoff add a Signed-off-by trailer
-t, --template use the specified template file
-e, --edit force edit of a commit
--cleanup how to strip spaces and #comments from the message
--status includes status in the commit message template
-S, --gpg-sign[=] GPG sign commit

Commit contents options

-a, --all commit all changed files
-i, --include adding specified files to the index for commit files
--interactive interactively add files
-p, --patch interactively add changes
-o, --only commit only specified files
-n, --no-verify bypass pre-commit and commit-msg hooks
--dry-run show what would be committed
--short show status concisely
--branch show branch information
--ahead-behind compute full ahead/behind values
--pocelain machine-readable output
--long show status in long format(default)
--z, --null terminate entries with NUL
-amend amend the previous commit
--no-post rewrite bypass post-rewrite hook
-u, --untracked-files[=] show untracked files, optional modes: all, normal, no. (Default: all)
--pathspec-from-file read pathspec from file
--pathspec-file-nul with --pathspec-from-file, pathspec elements are separated with NUL character

Git help –all See All Possible Commands

To list all possible commands, use the help –all command:

[user@localhost]     $ git help –all

Main Porcelain Commands