Title: Theory / Important / CS / Softw / VCS / Git / Commit
Tags: computer_to_instruction FromInstruction fromCommand fromMath hasNotNewEffectReturnsMeaning mathToDef some_instruction fromCommandLine instruction_to_flag

Name: The staging area
Definition: A file containing the version of the files that will go into your next commit.
Page: https://git-scm.com/docs/gitglossary#def_index
Chapter: 1
Section: 3
Name2: The index
Name3: The cache (obsolete)

Question: A commit contains
Answer: A link to its parents, and to the tree of the content of the directory
Chapter: 3
Section: 2

Fla: --verbose
Effect: add the diff between head and index to the default commit file
Prefix: git commit
Flag abbreviation: -v
Chapter: 2

Fla: commit
Effect: Ask for commit message, and then commit
Prefix: git
Chapter: 2

Fla: --all
Effect: stage every tracked file and commit
Prefix: git commit
Flag abbreviation: -a
Chapter: 2

Fla: --amend
Effect: Edit the last commit to contains the current staging area
Prefix: git commit
Chapter: 2
Section: 4

Fla: commit-tree tree
Effect: create a commit using tree foo, taking standard input as commit message
Page: https://git-scm.com/book/en/v2/Git-Internals-Git-Objects
Prefix: git
Chapter: 7
Section: 12
Print: hash of a parent-less commit with content tree

Fla: --message "message"
Effect: Use commit message and don't ask for it
Page: https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository
Prefix: git commit
Flag abbreviation: -m "message"
Chapter: 2

Name: The committer of commit c
Definition: The person who last applied commit c
Page: https://git-scm.com/book/en/v2/Git-Basics-Viewing-the-Commit-History
Chapter: 2
Section: 3
Variables: c a commit

Fla: --no-edit
Effect: Don't offer to edit commit message again
Page: https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History
Prefix: git commit --amend
Chapter: 7
Section: 6

Variable: commit.template
Meaning: file used as default template for new commit
Page: https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration
Context: git
Section: 1
Chapter: 8

Fla: --no-verify
Effect: don't run pre-commit hook
Page: https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks
Prefix: git commit
Flag abbreviation: -n
Chapter: 8
Section: 3

Typ: commit
Page: https://git-scm.com/book/en/v2/Git-Internals-Git-Objects
Chapter: 10
Section: 2
Context: git
Implementation: hash of parent, if any. Hash of top-level tree object. Author, committer, timestamp

Fla: -p foo
Effect: parent of generated commit-tree is foo
Page: https://git-scm.com/book/en/v2/Git-Internals-Git-Objects
Prefix: git commit-tree
Chapter: 10
Section: 2
Context: git

Variable: GIT_COMMITTER_NAME
Meaning: the human-readable name in the “committer" field.
Page: https://git-scm.com/book/en/v2/Git-Internals-Maintenance-and-Data-Recovery
Context: git
Section: 7
Chapter: 10
Kind: environment variable

Variable: GIT_COMMITTER_EMAIL
Meaning: the human-readable email in the “COMMITTER” field.
Page: https://git-scm.com/book/en/v2/Git-Internals-Maintenance-and-Data-Recovery
Context: git
Section: 7
Chapter: 10
Kind: environment variable

Variable: GIT_COMMITTER_DATE
Meaning: Timestamp for the "committer" field
Page: https://git-scm.com/book/en/v2/Git-Internals-Maintenance-and-Data-Recovery
Context: git
Section: 7
Chapter: 10
Kind: environment variable

Fla: --gpg-sign<keyid>
Effect: Sign the commit
Page: https://git-scm.com/book/en/v2/Appendix-C:-Git-Commands-Basic-Snapshotting
Prefix: git commit
Flag abbreviation: -S<keyid>
Chapter: A3
Section: 3
Context: git

Fla: todo
Page: https://git-scm.com/docs/git-commit-tree
Prefix: git commit-tree

Name: A commit
Definition: A single point in the Git history or an object representing this point
Page: https://git-scm.com/docs/gitglossary
Context: git
Name2: A changeset (not used in git, but equivalent in BitKeeper/cvsps)
Name3: A version (in other revision control system)
Name4: A revision (in other revision control system)

Name: A commit object
Definition: An object which contains the information about a particular revision, such as parents, committer, author, date and the tree object which corresponds to the top directory of the stored revision.
Page: https://git-scm.com/docs/gitglossary
Context: git

Name: A commit-ish
Definition: A commit object or an object that can be recursively dereferenced to a commit object.
Page: https://git-scm.com/docs/gitglossary
Context: git
Conjdef: Either

Fla: --patch
Effect: Use the interactive patch selection interface to choose which changes to commit.
Page: https://git-scm.com/docs/git-commit
Prefix: git commit
Flag abbreviation: -p

Fla: --reuse-message=<commit>
Effect: Uses commit message from <commit>
Page: https://git-scm.com/docs/git-commit
Prefix: git commit
Flag abbreviation: -C <commit>

Fla: --reedit-message=<commit>
Effect: Default editor with commit message from <commit>
Page: https://git-scm.com/docs/git-commit
Prefix: git commit
Flag abbreviation: -c

Fla: Create a new commit which "fixes up" <commit> when applied with git rebase --autosquash.
Effect: --fixup=[(amend|reword):]<commit>
Page: https://git-scm.com/docs/git-commit
Prefix: git commit

Fla: --squash=<commit>
Effect: Construct a commit message for use with rebase --autosquash.
Page: https://git-scm.com/docs/git-commit
Prefix: git commit

Fla: --reset-author
Effect: declare that the authorship of the resulting commit now belongs to the committer. This also renews the author timestamp.
Page: https://git-scm.com/docs/git-commit
Prefix: git commit
Assuming: -C/-c/--amend options, or when committing after a conflicting cherry-pick

Fla: --short
Effect: give the output in the short-format
Page: https://git-scm.com/docs/git-commit
Prefix: git commit
Assuming: --dry-run

Fla: --branch
Effect: Show the branch and tracking info even in short-format.
Page: https://git-scm.com/docs/git-commit
Prefix: git commit
Assuming: --dry-run

Fla: --porcelain
Effect: ive the output in a porcelain-ready format.
Page: https://git-scm.com/docs/git-commit
Prefix: git commit
Assuming: --dry-run

Fla: --long
Effect: give the output in the long-format
Page: https://git-scm.com/docs/git-commit
Prefix: git commit
Assuming: --dry-run

Fla: --null
Effect: print the filename verbatim and terminate the entries with NUL, instead of LF
Page: https://git-scm.com/docs/git-commit
Prefix: git commit
Flag abbreviation: -z
Assuming: --dry-run

Fla: --file=<file>
Effect: Take the commit message from the given file.
Page: https://git-scm.com/docs/git-commit
Prefix: git commit
Flag abbreviation: -F <file>

Fla: --file=-
Effect: Take the commit message from stdin
Page: https://git-scm.com/docs/git-commit
Prefix: git commit
Flag abbreviation: -F -

Fla: --author=<author>
Effect: set commit author as <author>
Page: https://git-scm.com/docs/git-commit
Prefix: git commit

Fla: --date=<date>
Effect: Override the author date used in the commit.
Page: https://git-scm.com/docs/git-commit
Prefix: git commit

Fla: --template=<file>
Effect: When editing the commit message, start the editor with the contents in the given file.
Page: https://git-scm.com/docs/git-commit
Prefix: git commit
Flag abbreviation: -t=<file>

Fla: --signoff
Effect: Add a Signed-off-by trailer by the committer at the end of the commit log message.
Page: https://git-scm.com/docs/git-commit
Prefix: git commit
Flag abbreviation: -s

Fla: --trailer <token>
Effect: add <token> at the end of the commit message
Page: https://git-scm.com/docs/git-commit
Prefix: git commit

Fla: --verify
Effect: Ensure pre-commit and commit-msg hooks are run
Page: https://git-scm.com/docs/git-commit
Prefix: git commit

Fla: --allow-empty
Effect: Allow to have no change in its tree
Page: https://git-scm.com/docs/git-commit
Prefix: git commit
Extra: primarily for use by foreign SCM interface scripts.

Fla: --allow-empty-message
Effect: allows you to create a commit with an empty commit message
Page: https://git-scm.com/docs/git-commit
Prefix: git commit
Extra: primarily for use by foreign SCM

Fla: --cleanup=strip
Effect: Strip same as whitespace, plus commentary
Page: https://git-scm.com/docs/git-commit
Prefix: git commit

Fla: --cleanup=whitespace
Effect: Strip leading and trailing empty lines, trailing whitespace, and collapse consecutive empty lines.
Page: https://git-scm.com/docs/git-commit
Prefix: git commit

Fla: --cleanup=verbatim
Effect: Do not change the message at all. (cancel previous --cleanup)
Page: https://git-scm.com/docs/git-commit
Prefix: git commit

Fla: --cleanup=scissors
Effect: Same as whitespace except that everything from (and including) the line found below is truncated, if the message is to be edited. "#" can be customized with core.commentChar.
# ------------------------ >8 ------------------------
Page: https://git-scm.com/docs/git-commit
Prefix: git commit

Fla: --cleanup=default
Effect: Same as strip if the message is to be edited. Otherwise whitespace.
Page: https://git-scm.com/docs/git-commit
Prefix: git commit

Fla: --edit
Effect: The message taken from file with -F, command line with -m, and from commit object with -C are usually used as the commit log message unmodified.
Page: https://git-scm.com/docs/git-commit
Prefix: git commit
Flag abbreviation: -e

Fla: --no-edit
Effect: Use the selected commit message without launching an editor.
Page: https://git-scm.com/docs/git-commit
Prefix: git commit

Fla: --no-post-rewrite
Effect: Bypass the post-rewrite hook.
Page: https://git-scm.com/docs/git-commit
Prefix: git commit

Fla: --only <path>...
Effect: The commit only contains changes from working tree's <path>...
Page: https://git-scm.com/docs/git-commit
Prefix: git commit
Flag abbreviation: -o <path>...

Fla: --include <path>...
Effect: The commit also contains changes from <path>...
Page: https://git-scm.com/docs/git-commit
Prefix: git commit
Flag abbreviation: -i <path>...

Fla: --pathspec-from-file=<file>
Effect: Pathspec is passed in <file> instead of commandline args.
Page: https://git-scm.com/docs/git-commit
Prefix: git commit

Fla: --pathspec-file-nul
Effect: Pathspec elements are separated with NUL character and all other characters are taken literally (including newlines and quotes).
Page: https://git-scm.com/docs/git-commit
Prefix: git commit
Assuming: --pathspec-from-file

Fla: --untracked-files=all
Effect: Show all untracked files and directory, recursively
Page: https://git-scm.com/docs/git-commit
Prefix: git commit
Flag abbreviation: -uall

Fla: --untracked-files=no
Effect: Don't show untracked files and directory
Page: https://git-scm.com/docs/git-commit
Prefix: git commit
Flag abbreviation: -uno

Fla: --untracked-files=normal
--untracked-files
Effect: Shows untracked files and directories but don't recurse
Page: https://git-scm.com/docs/git-commit
Prefix: git commit
Flag abbreviation: -unormal
-u

Fla: --quiet
Effect: Suppress commit summary message.
Page: https://git-scm.com/docs/git-commit
Prefix: git commit
Flag abbreviation: -q

Fla: --dry-run
Effect: Do not create a commit, but show a list of paths that are to be committed, paths with local changes that will be left uncommitted and paths that are untracked.
Page: https://git-scm.com/docs/git-commit
Prefix: git commit

Fla: --status
Effect: Include the output of git-status[1] in the commit message template when using an editor to prepare the commit message
Page: https://git-scm.com/docs/git-commit
Prefix: git commit

Fla: --no-status
Effect: Do not include the output of git-status[1] in the commit message template when using an editor to prepare the default commit message.
Page: https://git-scm.com/docs/git-commit
Prefix: git commit