Skip to content

Commit 66ea7e1

Browse files
authored
Merge pull request #860 from rpjday/help
Expand the "Getting Help" section to explain manpages versus "-h".
2 parents 4367b2f + 55fdc01 commit 66ea7e1

File tree

1 file changed

+26
-2
lines changed

1 file changed

+26
-2
lines changed

book/01-introduction/sections/help.asc

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
[[_git_help]]
22
=== Getting Help
33

4-
If you ever need help while using Git, there are three ways to get the manual page (manpage) help for any of the Git commands:
4+
If you ever need help while using Git, there are two equivalent ways to get the comprehensive manual page (manpage) help for any of the Git commands:
55

66
[source,console]
77
----
88
$ git help <verb>
9-
$ git <verb> --help
109
$ man git-<verb>
1110
----
1211

@@ -20,3 +19,28 @@ $ git help config
2019
These commands are nice because you can access them anywhere, even offline.
2120
If the manpages and this book aren't enough and you need in-person help, you can try the `#git` or `#github` channel on the Freenode IRC server (irc.freenode.net).
2221
These channels are regularly filled with hundreds of people who are all very knowledgeable about Git and are often willing to help.(((IRC)))
22+
23+
In addition, if you don't need the full-blown manpage help, but just need a quick refresher on the available options for a Git command, you can ask for the more concise ``help'' output with the `-h` or `--help` options, as in:
24+
25+
[source,console]
26+
----
27+
$ git add -h
28+
usage: git add [<options>] [--] <pathspec>...
29+
30+
-n, --dry-run dry run
31+
-v, --verbose be verbose
32+
33+
-i, --interactive interactive picking
34+
-p, --patch select hunks interactively
35+
-e, --edit edit current diff and apply
36+
-f, --force allow adding otherwise ignored files
37+
-u, --update update tracked files
38+
-N, --intent-to-add record only the fact that the path will be added later
39+
-A, --all add changes from all tracked and untracked files
40+
--ignore-removal ignore paths removed in the working tree (same as --no-all)
41+
--refresh don't add, only refresh the index
42+
--ignore-errors just skip files which cannot be added because of errors
43+
--ignore-missing check if - even missing - files are ignored in dry run
44+
--chmod <(+/-)x> override the executable bit of the listed files
45+
----
46+

0 commit comments

Comments
 (0)