The page introduces concepts/terminologies in a pedagogically sound order, so if you read through the links to all the concepts in order, the likelihood of needing concepts you have never encountered before is minimized.
The page illustrates command options and their combinations/interactions with examples so that you can get a better feel for what each option does.
When you click a command's link, options appear on the left panel and examples appear on the right panel.
The page groups command options into intuitive categories for easy discovery, rather than arranging everything in a simple list in alphabetical order.
If the command you want to know is not illustrated here, please refer to the official documentation.
Documentation:
Reference:
types of links:
progress of features:
These concepts help you understand Git internals: how to configure Git, Git's object model, how to manage working trees and files within them. These are the basis of the source code management layer. (In theory, you can use those underlying commands to implement a revision control system yourself.)
These concepts help you understand Git interface.
refs: lightweight named pointers to an object or another ref.
Specify objects (especially commits) more easily in the presence of refs.
Init and sync repos.
Bundle files in the working tree into commits, move refs between commits.
View commit history and differences between commits.
Merge history and rewrite history.
https://git-scm.com/docs/git-ls-remote
List references in a remote repository.
https://git-scm.com/docs/git-tag
Create, list, delete or verify a tag object signed with GPG.
https://git-scm.com/docs/git-init
Create an empty Git repository or reinitialize an existing one.
https://git-scm.com/docs/git-clone
Clone a repository into a new directory.
https://git-scm.com/docs/git-pull
Fetch from and integrate with another repository or a local branch.
https://git-scm.com/docs/git-push
Update remote refs along with associated objects.
https://git-scm.com/docs/git-ls-files
Show information about files in the index and the working tree.
https://git-scm.com/docs/git-diff
Show changes between commits, commit and working tree, etc.
jhcarl0814@jhcarl0814 MINGW64 / $?=0 $!= $OLDPWD=/ $PWD=/ %cd%=C:\Program Files\Git $ git version git version 2.47.0.windows.1 jhcarl0814@jhcarl0814 MINGW64 / $?=0 $!= $OLDPWD=/ $PWD=/ %cd%=C:\Program Files\Git $ git version --build-options git version 2.47.0.windows.1 cpu: x86_64 built from commit: d53e4648cb65eb75dd8d8a093d17400a18a9a15d sizeof-long: 4 sizeof-size_t: 8 shell-path: D:/git-sdk-64-build-installers/usr/bin/sh feature: fsmonitor--daemon libcurl: 8.10.1 OpenSSL: OpenSSL 3.2.3 3 Sep 2024 zlib: 1.3.1 jhcarl0814@jhcarl0814 MINGW64 / $?=0 $!= $OLDPWD=/ $PWD=/ %cd%=C:\Program Files\Git $ exit
jhcarl0814@jhcarl0814 MINGW64 /test_git $?=0 $!= $OLDPWD=/ $PWD=/test_git %cd%=C:\Program Files\Git\test_git $ git config set --file='./config.txt' 'section1.ke_y1' 'value1' error: invalid key: section1.ke_y1 jhcarl0814@jhcarl0814 MINGW64 /test_git $?=1 $!= $OLDPWD=/ $PWD=/test_git %cd%=C:\Program Files\Git\test_git $ git config set --file='./config.txt' 'section2.ke-y2' 'value2' jhcarl0814@jhcarl0814 MINGW64 /test_git $?=0 $!= $OLDPWD=/ $PWD=/test_git %cd%=C:\Program Files\Git\test_git $ git config set --file='./config.txt' 'section3.3key' 'value3' error: invalid key: section3.3key jhcarl0814@jhcarl0814 MINGW64 /test_git $?=1 $!= $OLDPWD=/ $PWD=/test_git %cd%=C:\Program Files\Git\test_git $ git config set --file='./config.txt' 'section4.-key4' 'value4' error: invalid key: section4.-key4 jhcarl0814@jhcarl0814 MINGW64 /test_git $?=1 $!= $OLDPWD=/ $PWD=/test_git %cd%=C:\Program Files\Git\test_git $ git config set --file='./config.txt' 's_ection5.key5' 'value5' error: invalid key: s_ection5.key5 jhcarl0814@jhcarl0814 MINGW64 /test_git $?=1 $!= $OLDPWD=/ $PWD=/test_git %cd%=C:\Program Files\Git\test_git $ git config set --file='./config.txt' 's-ection6.key6' 'value6' jhcarl0814@jhcarl0814 MINGW64 /test_git $?=0 $!= $OLDPWD=/ $PWD=/test_git %cd%=C:\Program Files\Git\test_git $ git config set --file='./config.txt' '7section.key7' 'value7' jhcarl0814@jhcarl0814 MINGW64 /test_git $?=0 $!= $OLDPWD=/ $PWD=/test_git %cd%=C:\Program Files\Git\test_git $ git config set --file='./config.txt' -- '-section81.key81' 'value81' jhcarl0814@jhcarl0814 MINGW64 /test_git $?=0 $!= $OLDPWD=/ $PWD=/test_git %cd%=C:\Program Files\Git\test_git $ git config set --file='./config.txt' --end-of-options '-section82.key82' 'value82' jhcarl0814@jhcarl0814 MINGW64 /test_git $?=0 $!= $OLDPWD=/ $PWD=/test_git %cd%=C:\Program Files\Git\test_git $ git config set --file='./config.txt' 'section.'$'\x01\x02\x03\x04\x05\x06\x07\x08\x09''.key' 'value' jhcarl0814@jhcarl0814 MINGW64 /test_git $?=0 $!= $OLDPWD=/ $PWD=/test_git %cd%=C:\Program Files\Git\test_git $ git config set --file='./config.txt' 'section.'$'\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F\x20"\\\x7F''.key' 'value' jhcarl0814@jhcarl0814 MINGW64 /test_git $?=0 $!= $OLDPWD=/ $PWD=/test_git %cd%=C:\Program Files\Git\test_git $ git config set --file='./config.txt' 'section.subse.ction.key' 'value' jhcarl0814@jhcarl0814 MINGW64 /test_git $?=0 $!= $OLDPWD=/ $PWD=/test_git %cd%=C:\Program Files\Git\test_git $ treex '.' ./ d/0o040/directory rwxr-xr-x/0o755 ├-config.txt -/0o100/regular file rw-r--r--/0o644 | 1 [section2]\n | 2 \tke-y2 = value2\n | 3 [s-ection6]\n | 4 \tkey6 = value6\n | 5 [7section]\n | 6 \tkey7 = value7\n | 7 [-section81]\n | 8 \tkey81 = value81\n | 9 [-section82]\n | 10 \tkey82 = value82\n | 11 [section "\x01\x02\x03\x04\x05\x06\a\b\t"]\n | 12 \tkey = value\n | 13 [section "\v\f\r | 14 \x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\e\x1C\x1D\x1E\x1F \\"\\\\\x7F"]\n | 15 \tkey = value\n | 16 [section "subse.ction"]\n | 17 \tkey = value\n | 18 jhcarl0814@jhcarl0814 MINGW64 /test_git $?=0 $!= $OLDPWD=/ $PWD=/test_git %cd%=C:\Program Files\Git\test_git $ git config list --file='./config.txt' section2.ke-y2=value2 s-ection6.key6=value6 7section.key7=value7 -section81.key81=value81 -section82.key82=value82 section. .key=value "\.key=value section.subse.ction.key=value jhcarl0814@jhcarl0814 MINGW64 /test_git $?=0 $!= $OLDPWD=/ $PWD=/test_git %cd%=C:\Program Files\Git\test_git $ jhcarl0814@jhcarl0814 MINGW64 /test_git $?=0 $!= $OLDPWD=/ $PWD=/test_git %cd%=C:\Program Files\Git\test_git $ echo -n -e '[section "a\0b\0c"] > key = value > ' >>'./config.txt' jhcarl0814@jhcarl0814 MINGW64 /test_git $?=0 $!= $OLDPWD=/ $PWD=/test_git %cd%=C:\Program Files\Git\test_git $ treex '.' ./ d/0o040/directory rwxr-xr-x/0o755 ├-config.txt -/0o100/regular file rw-r--r--/0o644 | 1 [section2]\n | 2 \tke-y2 = value2\n | 3 [s-ection6]\n | 4 \tkey6 = value6\n | 5 [7section]\n | 6 \tkey7 = value7\n | 7 [-section81]\n | 8 \tkey81 = value81\n | 9 [-section82]\n | 10 \tkey82 = value82\n | 11 [section "\x01\x02\x03\x04\x05\x06\a\b\t"]\n | 12 \tkey = value\n | 13 [section "\v\f\r | 14 \x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\e\x1C\x1D\x1E\x1F \\"\\\\\x7F"]\n | 15 \tkey = value\n | 16 [section "subse.ction"]\n | 17 \tkey = value\n | 18 [section "a\0b\0c"]\n | 19 key = value\n | 20 jhcarl0814@jhcarl0814 MINGW64 /test_git $?=0 $!= $OLDPWD=/ $PWD=/test_git %cd%=C:\Program Files\Git\test_git $ git config list --file='./config.txt' | special_character_to_escape_sequence_preserve_line_ending | cat_with_line_number 1 section2.ke-y2=value2\n 2 s-ection6.key6=value6\n 3 7section.key7=value7\n 4 -section81.key81=value81\n 5 -section82.key82=value82\n 6 section.\x01\x02\x03\x04\x05\x06\a\b\t.key=value\n 7 section.\v\f\r 8 \x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\e\x1C\x1D\x1E\x1F "\\\x7F.key=value\n 9 section.subse.ction.key=value\n 10 section.a=value\n 11 jhcarl0814@jhcarl0814 MINGW64 /test_git $?=0 $!= $OLDPWD=/ $PWD=/test_git %cd%=C:\Program Files\Git\test_git $ jhcarl0814@jhcarl0814 MINGW64 /test_git $?=0 $!= $OLDPWD=/ $PWD=/test_git %cd%=C:\Program Files\Git\test_git $ echo -n -e '[section "a\\nb\\nc"] > key = value > ' >>'./config.txt' jhcarl0814@jhcarl0814 MINGW64 /test_git $?=0 $!= $OLDPWD=/ $PWD=/test_git %cd%=C:\Program Files\Git\test_git $ treex '.' ./ d/0o040/directory rwxr-xr-x/0o755 ├-config.txt -/0o100/regular file rw-r--r--/0o644 | 1 [section2]\n | 2 \tke-y2 = value2\n | 3 [s-ection6]\n | 4 \tkey6 = value6\n | 5 [7section]\n | 6 \tkey7 = value7\n | 7 [-section81]\n | 8 \tkey81 = value81\n | 9 [-section82]\n | 10 \tkey82 = value82\n | 11 [section "\x01\x02\x03\x04\x05\x06\a\b\t"]\n | 12 \tkey = value\n | 13 [section "\v\f\r | 14 \x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\e\x1C\x1D\x1E\x1F \\"\\\\\x7F"]\n | 15 \tkey = value\n | 16 [section "subse.ction"]\n | 17 \tkey = value\n | 18 [section "a\0b\0c"]\n | 19 key = value\n | 20 [section "a\\nb\\nc"]\n | 21 key = value\n | 22 jhcarl0814@jhcarl0814 MINGW64 /test_git $?=0 $!= $OLDPWD=/ $PWD=/test_git %cd%=C:\Program Files\Git\test_git $ git config list --file='./config.txt' | special_character_to_escape_sequence_preserve_line_ending | cat_with_line_number 1 section2.ke-y2=value2\n 2 s-ection6.key6=value6\n 3 7section.key7=value7\n 4 -section81.key81=value81\n 5 -section82.key82=value82\n 6 section.\x01\x02\x03\x04\x05\x06\a\b\t.key=value\n 7 section.\v\f\r 8 \x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\e\x1C\x1D\x1E\x1F "\\\x7F.key=value\n 9 section.subse.ction.key=value\n 10 section.a=value\n 11 section.anbnc.key=value\n 12 jhcarl0814@jhcarl0814 MINGW64 /test_git $?=0 $!= $OLDPWD=/ $PWD=/test_git %cd%=C:\Program Files\Git\test_git $ jhcarl0814@jhcarl0814 MINGW64 /test_git $?=0 $!= $OLDPWD=/ $PWD=/test_git %cd%=C:\Program Files\Git\test_git $ echo -n -e '[section "a\nb\nc"] > key = value > ' >>'./config.txt' jhcarl0814@jhcarl0814 MINGW64 /test_git $?=0 $!= $OLDPWD=/ $PWD=/test_git %cd%=C:\Program Files\Git\test_git $ treex '.' ./ d/0o040/directory rwxr-xr-x/0o755 ├-config.txt -/0o100/regular file rw-r--r--/0o644 | 1 [section2]\n | 2 \tke-y2 = value2\n | 3 [s-ection6]\n | 4 \tkey6 = value6\n | 5 [7section]\n | 6 \tkey7 = value7\n | 7 [-section81]\n | 8 \tkey81 = value81\n | 9 [-section82]\n | 10 \tkey82 = value82\n | 11 [section "\x01\x02\x03\x04\x05\x06\a\b\t"]\n | 12 \tkey = value\n | 13 [section "\v\f\r | 14 \x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\e\x1C\x1D\x1E\x1F \\"\\\\\x7F"]\n | 15 \tkey = value\n | 16 [section "subse.ction"]\n | 17 \tkey = value\n | 18 [section "a\0b\0c"]\n | 19 key = value\n | 20 [section "a\\nb\\nc"]\n | 21 key = value\n | 22 [section "a\n | 23 b\n | 24 c"]