By admin , 29 April 2026

Synopsis

git checkout-index [-a] [-f] [-u] [--prefix=<dir>] [<file>...]

Description

The git checkout-index command writes file content from the index out to the working tree (or to an arbitrary directory using --prefix). It does not change the index, the current branch, or HEAD — making it safer than git checkout for scripted file extraction.

By admin , 29 April 2026

Synopsis

git diff-index [--cached] [-p] <tree-ish> [<path>...]

Description

The git diff-index command is the plumbing companion to git diff. It compares a tree object (commit, tag) against the index or working tree. Output is the raw, machine-readable diff format unless -p requests a patch.

By admin , 29 April 2026

Synopsis

git commit-tree <tree> [-p <parent>]... [-m <msg>] [-S]

Description

The git commit-tree command builds a commit object from a given tree SHA, an optional list of parent commits, and a message. It outputs the new commit's SHA. Unlike git commit, it does NOT update any ref — the resulting commit is dangling until you point a branch or tag at it.

By admin , 29 April 2026

Synopsis

git write-tree [--missing-ok] [--prefix=<dir>]

Description

The git write-tree command serializes the current index into a tree object in the database, returning the SHA. It is the plumbing inverse of read-tree: that command loads a tree, this one stores one.

By admin , 29 April 2026

Synopsis

git read-tree [-m | -u | --reset] <tree-ish>...

Description

The git read-tree command loads tree contents into the index. Variants support merging up to three trees (a base, ours, theirs) for use during merges. git checkout, git merge, and git reset all use read-tree internally.

By admin , 29 April 2026

Synopsis

git update-index [--add] [--remove] [--refresh] [--assume-unchanged] <file>...

Description

The git update-index command is the plumbing behind git add. It records file contents in the index by SHA, manages flags like assume-unchanged and skip-worktree, and updates index timestamps. Most porcelain operations call into it.

By admin , 29 April 2026

Synopsis

git add -p [<path>...]
git add --patch [<path>...]

Description

The git add -p command launches an interactive interface that walks through each "hunk" of changes in your working tree, asking you to decide for each: stage, skip, split, edit, etc. This is the secret weapon for crafting clean, atomic commits when your working tree contains a mixture of related and unrelated changes.

By admin , 29 April 2026

Synopsis

git instaweb [--httpd=<daemon>] [--port=<n>] [--start | --stop | --restart]

Description

The git instaweb command spins up a local web server (lighttpd, Apache, webrick, or Python's http.server) hosting the gitweb interface for the current repository. It opens a browser pointing at it, giving you a quick web UI for browsing history, files, and diffs without any setup.

By admin , 29 April 2026

Synopsis

git send-email [--to <addr>] [--cc <addr>] [--cover-letter] <patch-or-dir>...

Description

The git send-email command sends one or more patches via SMTP, each as a properly threaded email. It is the canonical tool for submitting patches to mailing-list-driven projects (Linux kernel, Git itself, U-Boot, etc.). It can read SMTP credentials from your Git config, prompt for them interactively, or use authentication files.

By admin , 29 April 2026

Synopsis

git request-pull [-p] <start> <url> [<end>]

Description

The git request-pull command generates a textual summary asking an upstream maintainer to pull changes from your repository. The output includes a list of commits in the range, a diffstat, the URL and ref to pull from, and (if applicable) the SHA of the tagged version. It's the standard way to send a pull request via email on mailing-list-driven projects.