2005-05-19 20:24:54 +04:00
|
|
|
git(7)
|
2005-05-11 01:32:30 +04:00
|
|
|
======
|
|
|
|
|
|
|
|
NAME
|
|
|
|
----
|
|
|
|
git - the stupid content tracker
|
|
|
|
|
|
|
|
|
|
|
|
SYNOPSIS
|
|
|
|
--------
|
2006-08-25 05:05:48 +04:00
|
|
|
[verse]
|
2006-07-25 22:24:22 +04:00
|
|
|
'git' [--version] [--exec-path[=GIT_EXEC_PATH]] [-p|--paginate]
|
2006-08-25 05:05:48 +04:00
|
|
|
[--bare] [--git-dir=GIT_DIR] [--help] COMMAND [ARGS]
|
2005-05-11 01:32:30 +04:00
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
-----------
|
2006-04-03 01:54:34 +04:00
|
|
|
Git is a fast, scalable, distributed revision control system with an
|
|
|
|
unusually rich command set that provides both high-level operations
|
|
|
|
and full access to internals.
|
|
|
|
|
|
|
|
See this link:tutorial.html[tutorial] to get started, then see
|
|
|
|
link:everyday.html[Everyday Git] for a useful minimum set of commands, and
|
|
|
|
"man git-commandname" for documentation of each command. CVS users may
|
|
|
|
also want to read link:cvs-migration.html[CVS migration].
|
2005-11-16 02:31:25 +03:00
|
|
|
|
2006-06-07 22:43:50 +04:00
|
|
|
The COMMAND is either a name of a Git command (see below) or an alias
|
|
|
|
as defined in the configuration file (see gitlink:git-repo-config[1]).
|
|
|
|
|
2005-11-16 02:31:25 +03:00
|
|
|
OPTIONS
|
|
|
|
-------
|
|
|
|
--version::
|
2006-03-09 19:24:19 +03:00
|
|
|
Prints the git suite version that the 'git' program came from.
|
2005-11-16 02:31:25 +03:00
|
|
|
|
|
|
|
--help::
|
2006-03-09 19:24:19 +03:00
|
|
|
Prints the synopsis and a list of the most commonly used
|
|
|
|
commands. If a git command is named this option will bring up
|
|
|
|
the man-page for that command. If the option '--all' or '-a' is
|
|
|
|
given then all available commands are printed.
|
2005-11-16 02:31:25 +03:00
|
|
|
|
|
|
|
--exec-path::
|
2006-03-09 19:24:19 +03:00
|
|
|
Path to wherever your core git programs are installed.
|
2005-11-16 02:31:25 +03:00
|
|
|
This can also be controlled by setting the GIT_EXEC_PATH
|
|
|
|
environment variable. If no path is given 'git' will print
|
|
|
|
the current setting and then exit.
|
|
|
|
|
2006-07-25 22:24:22 +04:00
|
|
|
-p|--paginate::
|
|
|
|
Pipe all output into 'less' (or if set, $PAGER).
|
|
|
|
|
|
|
|
--git-dir=<path>::
|
|
|
|
Set the path to the repository. This can also be controlled by
|
|
|
|
setting the GIT_DIR environment variable.
|
|
|
|
|
|
|
|
--bare::
|
|
|
|
Same as --git-dir=`pwd`.
|
2005-12-13 13:38:24 +03:00
|
|
|
|
2006-04-03 01:54:34 +04:00
|
|
|
FURTHER DOCUMENTATION
|
|
|
|
---------------------
|
2005-12-13 13:38:24 +03:00
|
|
|
|
2006-04-03 01:54:34 +04:00
|
|
|
See the references above to get started using git. The following is
|
|
|
|
probably more detail than necessary for a first-time user.
|
2005-08-31 00:51:01 +04:00
|
|
|
|
2006-04-03 01:54:34 +04:00
|
|
|
The <<Discussion,Discussion>> section below and the
|
|
|
|
link:core-tutorial.html[Core tutorial] both provide introductions to the
|
|
|
|
underlying git architecture.
|
2005-08-25 11:28:18 +04:00
|
|
|
|
2006-04-03 01:54:34 +04:00
|
|
|
See also the link:howto-index.html[howto] documents for some useful
|
|
|
|
examples.
|
2005-12-13 13:38:24 +03:00
|
|
|
|
2006-04-03 01:54:34 +04:00
|
|
|
GIT COMMANDS
|
|
|
|
------------
|
2005-12-13 13:38:24 +03:00
|
|
|
|
2006-04-03 01:54:34 +04:00
|
|
|
We divide git into high level ("porcelain") commands and low level
|
|
|
|
("plumbing") commands.
|
2005-12-10 10:41:03 +03:00
|
|
|
|
2006-04-03 01:54:34 +04:00
|
|
|
Low-level commands (plumbing)
|
|
|
|
-----------------------------
|
2005-08-25 11:28:18 +04:00
|
|
|
|
2006-04-03 01:54:34 +04:00
|
|
|
Although git includes its
|
|
|
|
own porcelain layer, its low-level commands are sufficient to support
|
|
|
|
development of alternative porcelains. Developers of such porcelains
|
|
|
|
might start by reading about gitlink:git-update-index[1] and
|
|
|
|
gitlink:git-read-tree[1].
|
2005-05-11 01:32:30 +04:00
|
|
|
|
2006-04-03 01:54:34 +04:00
|
|
|
We divide the low-level commands into commands that manipulate objects (in
|
|
|
|
the repository, index, and working tree), commands that interrogate and
|
|
|
|
compare objects, and commands that move objects and references between
|
|
|
|
repositories.
|
2005-05-11 01:32:37 +04:00
|
|
|
|
2005-05-11 01:32:30 +04:00
|
|
|
Manipulation commands
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-apply[1]::
|
2005-08-30 04:21:06 +04:00
|
|
|
Reads a "diff -up1" or git generated patch file and
|
|
|
|
applies it to the working tree.
|
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-checkout-index[1]::
|
2005-12-08 03:05:21 +03:00
|
|
|
Copy files from the index to the working tree.
|
2005-05-11 01:32:30 +04:00
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-commit-tree[1]::
|
2005-12-08 03:05:21 +03:00
|
|
|
Creates a new commit object.
|
2005-05-11 01:32:30 +04:00
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-hash-object[1]::
|
2005-08-30 04:21:06 +04:00
|
|
|
Computes the object ID from a file.
|
|
|
|
|
2005-11-15 15:29:18 +03:00
|
|
|
gitlink:git-index-pack[1]::
|
2005-12-08 03:05:21 +03:00
|
|
|
Build pack idx file for an existing packed archive.
|
2005-10-12 23:01:31 +04:00
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-init-db[1]::
|
2005-12-08 03:05:21 +03:00
|
|
|
Creates an empty git object database, or reinitialize an
|
|
|
|
existing one.
|
2005-05-11 01:32:30 +04:00
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-merge-index[1]::
|
2005-12-08 03:05:21 +03:00
|
|
|
Runs a merge for files needing merging.
|
2005-05-11 01:32:30 +04:00
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-mktag[1]::
|
2005-12-08 03:05:21 +03:00
|
|
|
Creates a tag object.
|
2005-05-11 01:32:30 +04:00
|
|
|
|
2006-04-13 11:09:54 +04:00
|
|
|
gitlink:git-mktree[1]::
|
|
|
|
Build a tree-object from ls-tree formatted text.
|
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-pack-objects[1]::
|
2005-08-30 04:21:06 +04:00
|
|
|
Creates a packed archive of objects.
|
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-prune-packed[1]::
|
2005-08-30 04:21:06 +04:00
|
|
|
Remove extra objects that are already in pack files.
|
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-read-tree[1]::
|
2005-12-08 03:05:21 +03:00
|
|
|
Reads tree information into the index.
|
2005-05-11 01:32:30 +04:00
|
|
|
|
2005-11-24 13:36:01 +03:00
|
|
|
gitlink:git-repo-config[1]::
|
|
|
|
Get and set options in .git/config.
|
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-unpack-objects[1]::
|
2005-08-30 04:21:06 +04:00
|
|
|
Unpacks objects out of a packed archive.
|
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-update-index[1]::
|
2005-12-08 03:05:21 +03:00
|
|
|
Registers files in the working tree to the index.
|
2005-05-11 01:32:30 +04:00
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-write-tree[1]::
|
2005-12-08 03:05:21 +03:00
|
|
|
Creates a tree from the index.
|
2005-05-11 01:32:30 +04:00
|
|
|
|
2005-08-16 02:48:47 +04:00
|
|
|
|
2005-05-11 01:32:30 +04:00
|
|
|
Interrogation commands
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~
|
2005-08-30 04:21:06 +04:00
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-cat-file[1]::
|
2005-12-08 03:05:21 +03:00
|
|
|
Provide content or type/size information for repository objects.
|
2005-05-11 01:32:30 +04:00
|
|
|
|
2005-12-28 03:10:56 +03:00
|
|
|
gitlink:git-describe[1]::
|
|
|
|
Show the most recent tag that is reachable from a commit.
|
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-diff-index[1]::
|
2005-12-08 03:05:21 +03:00
|
|
|
Compares content and mode of blobs between the index and repository.
|
2005-05-11 01:32:30 +04:00
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-diff-files[1]::
|
2005-12-08 03:05:21 +03:00
|
|
|
Compares files in the working tree and the index.
|
2005-05-11 01:32:30 +04:00
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-diff-stages[1]::
|
2005-12-08 03:05:21 +03:00
|
|
|
Compares two "merge stages" in the index.
|
2005-08-17 04:41:32 +04:00
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-diff-tree[1]::
|
2005-12-08 03:05:21 +03:00
|
|
|
Compares the content and mode of blobs found via two tree objects.
|
2005-08-30 04:21:06 +04:00
|
|
|
|
2006-10-29 01:25:41 +04:00
|
|
|
gitlink:git-for-each-ref[1]::
|
|
|
|
Output information on each ref.
|
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-fsck-objects[1]::
|
2005-12-08 03:05:21 +03:00
|
|
|
Verifies the connectivity and validity of the objects in the database.
|
2005-05-11 01:32:30 +04:00
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-ls-files[1]::
|
2005-12-08 03:05:21 +03:00
|
|
|
Information about files in the index and the working tree.
|
2005-05-11 01:32:30 +04:00
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-ls-tree[1]::
|
2005-12-08 03:05:21 +03:00
|
|
|
Displays a tree object in human readable form.
|
2005-05-11 01:32:30 +04:00
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-merge-base[1]::
|
2005-12-08 03:05:21 +03:00
|
|
|
Finds as good common ancestors as possible for a merge.
|
2005-05-11 01:32:30 +04:00
|
|
|
|
2005-10-27 13:57:44 +04:00
|
|
|
gitlink:git-name-rev[1]::
|
2005-12-08 03:05:21 +03:00
|
|
|
Find symbolic names for given revs.
|
2005-10-27 13:57:44 +04:00
|
|
|
|
2005-12-13 10:55:09 +03:00
|
|
|
gitlink:git-pack-redundant[1]::
|
|
|
|
Find redundant pack files.
|
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-rev-list[1]::
|
2005-12-08 03:05:21 +03:00
|
|
|
Lists commit objects in reverse chronological order.
|
2005-05-11 01:32:30 +04:00
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-show-index[1]::
|
2005-08-30 04:21:06 +04:00
|
|
|
Displays contents of a pack idx file.
|
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-tar-tree[1]::
|
2005-12-08 03:05:21 +03:00
|
|
|
Creates a tar archive of the files in the named tree object.
|
2005-05-11 01:32:30 +04:00
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-unpack-file[1]::
|
2005-12-08 03:05:21 +03:00
|
|
|
Creates a temporary file with a blob's contents.
|
2005-05-11 01:32:30 +04:00
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-var[1]::
|
2005-12-08 03:05:21 +03:00
|
|
|
Displays a git logical variable.
|
2005-07-15 04:55:09 +04:00
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-verify-pack[1]::
|
2005-12-08 03:05:21 +03:00
|
|
|
Validates packed git archive files.
|
2005-06-29 13:51:27 +04:00
|
|
|
|
2005-12-08 03:05:21 +03:00
|
|
|
In general, the interrogate commands do not touch the files in
|
|
|
|
the working tree.
|
2005-05-11 01:32:30 +04:00
|
|
|
|
|
|
|
|
2005-07-16 11:17:42 +04:00
|
|
|
Synching repositories
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-fetch-pack[1]::
|
2005-12-08 03:05:21 +03:00
|
|
|
Updates from a remote repository (engine for ssh and
|
|
|
|
local transport).
|
2005-08-30 04:21:06 +04:00
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-http-fetch[1]::
|
2005-12-08 03:05:21 +03:00
|
|
|
Downloads a remote git repository via HTTP by walking
|
|
|
|
commit chain.
|
2005-05-11 01:32:37 +04:00
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-local-fetch[1]::
|
2005-12-08 03:05:21 +03:00
|
|
|
Duplicates another git repository on a local system by
|
|
|
|
walking commit chain.
|
2005-05-11 01:32:37 +04:00
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-peek-remote[1]::
|
2005-12-08 03:05:21 +03:00
|
|
|
Lists references on a remote repository using
|
|
|
|
upload-pack protocol (engine for ssh and local
|
|
|
|
transport).
|
2005-07-14 11:10:48 +04:00
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-receive-pack[1]::
|
2005-07-14 11:10:48 +04:00
|
|
|
Invoked by 'git-send-pack' to receive what is pushed to it.
|
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-send-pack[1]::
|
2005-08-30 04:21:06 +04:00
|
|
|
Pushes to a remote repository, intelligently.
|
2005-07-14 11:10:48 +04:00
|
|
|
|
2005-12-13 10:55:09 +03:00
|
|
|
gitlink:git-http-push[1]::
|
|
|
|
Push missing objects using HTTP/DAV.
|
|
|
|
|
2005-10-26 01:43:30 +04:00
|
|
|
gitlink:git-shell[1]::
|
|
|
|
Restricted shell for GIT-only SSH access.
|
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-ssh-fetch[1]::
|
2005-12-08 03:05:21 +03:00
|
|
|
Pulls from a remote repository over ssh connection by
|
|
|
|
walking commit chain.
|
2005-07-24 04:54:15 +04:00
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-ssh-upload[1]::
|
2005-12-08 03:05:21 +03:00
|
|
|
Helper "server-side" program used by git-ssh-fetch.
|
2005-07-14 11:10:48 +04:00
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-update-server-info[1]::
|
2005-07-24 04:54:56 +04:00
|
|
|
Updates auxiliary information on a dumb server to help
|
|
|
|
clients discover references and packs on it.
|
|
|
|
|
2006-10-05 12:42:16 +04:00
|
|
|
gitlink:git-upload-archive[1]::
|
|
|
|
Invoked by 'git-archive' to send a generated archive.
|
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-upload-pack[1]::
|
2006-06-21 10:54:26 +04:00
|
|
|
Invoked by 'git-fetch-pack' to push
|
2005-08-30 04:21:06 +04:00
|
|
|
what are asked for.
|
|
|
|
|
2005-07-14 11:10:48 +04:00
|
|
|
|
2006-04-03 01:54:34 +04:00
|
|
|
High-level commands (porcelain)
|
|
|
|
-------------------------------
|
|
|
|
|
|
|
|
We separate the porcelain commands into the main commands and some
|
|
|
|
ancillary user utilities.
|
|
|
|
|
|
|
|
Main porcelain commands
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~
|
2005-08-27 08:33:46 +04:00
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-add[1]::
|
2005-12-08 03:05:21 +03:00
|
|
|
Add paths to the index.
|
2005-08-27 08:33:46 +04:00
|
|
|
|
2005-10-26 02:03:21 +04:00
|
|
|
gitlink:git-am[1]::
|
|
|
|
Apply patches from a mailbox, but cooler.
|
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-applymbox[1]::
|
2005-12-08 03:05:21 +03:00
|
|
|
Apply patches from a mailbox, original version by Linus.
|
2005-08-30 04:21:06 +04:00
|
|
|
|
2006-09-25 14:31:52 +04:00
|
|
|
gitlink:git-archive[1]::
|
|
|
|
Creates an archive of files from a named tree.
|
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-bisect[1]::
|
2005-12-08 03:05:21 +03:00
|
|
|
Find the change that introduced a bug by binary search.
|
2005-08-30 04:21:06 +04:00
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-branch[1]::
|
2005-08-27 08:33:46 +04:00
|
|
|
Create and Show branches.
|
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-checkout[1]::
|
2005-09-08 01:28:21 +04:00
|
|
|
Checkout and switch to a branch.
|
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-cherry-pick[1]::
|
2005-08-30 04:21:06 +04:00
|
|
|
Cherry-pick the effect of an existing commit.
|
2005-08-15 04:24:36 +04:00
|
|
|
|
2006-04-13 11:09:54 +04:00
|
|
|
gitlink:git-clean[1]::
|
|
|
|
Remove untracked files from the working tree.
|
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-clone[1]::
|
2005-08-30 04:21:06 +04:00
|
|
|
Clones a repository into a new directory.
|
2005-08-15 04:24:36 +04:00
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-commit[1]::
|
2005-08-30 04:21:06 +04:00
|
|
|
Record changes to the repository.
|
2005-08-15 04:24:36 +04:00
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-diff[1]::
|
2005-09-13 06:39:15 +04:00
|
|
|
Show changes between commits, commit and working tree, etc.
|
2005-09-08 10:04:52 +04:00
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-fetch[1]::
|
2005-08-09 04:39:18 +04:00
|
|
|
Download from a remote repository via various protocols.
|
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-format-patch[1]::
|
2005-09-13 06:39:15 +04:00
|
|
|
Prepare patches for e-mail submission.
|
2005-09-08 10:04:52 +04:00
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-grep[1]::
|
2005-12-08 03:05:21 +03:00
|
|
|
Print lines matching a pattern.
|
2005-09-13 06:39:15 +04:00
|
|
|
|
2006-09-01 03:15:38 +04:00
|
|
|
gitlink:gitk[1]::
|
|
|
|
The git repository browser.
|
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-log[1]::
|
2005-08-30 04:21:06 +04:00
|
|
|
Shows commit logs.
|
2005-08-09 04:39:18 +04:00
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-ls-remote[1]::
|
2005-08-30 04:21:06 +04:00
|
|
|
Shows references in a remote or local repository.
|
2005-08-25 03:23:08 +04:00
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-merge[1]::
|
2005-09-09 12:15:47 +04:00
|
|
|
Grand unified merge driver.
|
|
|
|
|
2005-10-26 02:03:21 +04:00
|
|
|
gitlink:git-mv[1]::
|
|
|
|
Move or rename a file, a directory, or a symlink.
|
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-pull[1]::
|
2006-10-29 23:09:40 +03:00
|
|
|
Fetch from and merge with a remote repository or a local branch.
|
2005-08-30 04:21:06 +04:00
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-push[1]::
|
2005-08-25 03:23:08 +04:00
|
|
|
Update remote refs along with associated objects.
|
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-rebase[1]::
|
2005-12-08 03:05:21 +03:00
|
|
|
Rebase local commits to the updated upstream head.
|
2005-08-09 04:39:18 +04:00
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-repack[1]::
|
2005-08-16 02:48:47 +04:00
|
|
|
Pack unpacked objects in a repository.
|
|
|
|
|
2006-01-29 10:15:24 +03:00
|
|
|
gitlink:git-rerere[1]::
|
|
|
|
Reuse recorded resolution of conflicted merges.
|
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-reset[1]::
|
2005-09-08 01:28:21 +04:00
|
|
|
Reset current HEAD to the specified state.
|
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-resolve[1]::
|
2005-08-30 04:21:06 +04:00
|
|
|
Merge two commits.
|
2005-08-17 04:41:32 +04:00
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-revert[1]::
|
2005-08-30 04:21:06 +04:00
|
|
|
Revert an existing commit.
|
|
|
|
|
2006-04-13 11:09:54 +04:00
|
|
|
gitlink:git-rm[1]::
|
|
|
|
Remove files from the working tree and from the index.
|
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-shortlog[1]::
|
2005-08-30 04:21:06 +04:00
|
|
|
Summarizes 'git log' output.
|
|
|
|
|
2006-03-18 03:21:39 +03:00
|
|
|
gitlink:git-show[1]::
|
|
|
|
Show one commit log and its diff.
|
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-show-branch[1]::
|
2005-08-30 04:21:06 +04:00
|
|
|
Show branches and their commits.
|
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-status[1]::
|
2005-08-30 04:21:06 +04:00
|
|
|
Shows the working tree status.
|
2005-08-17 04:41:32 +04:00
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-verify-tag[1]::
|
2005-08-27 08:33:46 +04:00
|
|
|
Check the GPG signature of tag.
|
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-whatchanged[1]::
|
2005-08-30 04:21:06 +04:00
|
|
|
Shows commit logs and differences they introduce.
|
|
|
|
|
2005-08-16 02:48:47 +04:00
|
|
|
|
2005-08-15 19:23:06 +04:00
|
|
|
Ancillary Commands
|
2006-04-03 01:54:34 +04:00
|
|
|
~~~~~~~~~~~~~~~~~~
|
2005-07-14 11:10:48 +04:00
|
|
|
Manipulators:
|
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-applypatch[1]::
|
2005-08-30 04:21:06 +04:00
|
|
|
Apply one patch extracted from an e-mail.
|
2005-08-27 08:33:46 +04:00
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-archimport[1]::
|
2005-09-08 01:08:38 +04:00
|
|
|
Import an arch repository into git.
|
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-convert-objects[1]::
|
2005-12-08 03:05:21 +03:00
|
|
|
Converts old-style git repository.
|
2005-07-14 11:10:48 +04:00
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-cvsimport[1]::
|
2005-08-30 04:21:06 +04:00
|
|
|
Salvage your data out of another SCM people love to hate.
|
|
|
|
|
2005-12-13 10:55:09 +03:00
|
|
|
gitlink:git-cvsexportcommit[1]::
|
|
|
|
Export a single commit to a CVS checkout.
|
|
|
|
|
2006-04-13 11:09:54 +04:00
|
|
|
gitlink:git-cvsserver[1]::
|
|
|
|
A CVS server emulator for git.
|
|
|
|
|
2005-11-13 13:07:02 +03:00
|
|
|
gitlink:git-lost-found[1]::
|
2005-11-08 02:15:34 +03:00
|
|
|
Recover lost refs that luckily have not yet been pruned.
|
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-merge-one-file[1]::
|
2005-12-08 03:05:21 +03:00
|
|
|
The standard helper program to use with `git-merge-index`.
|
2005-05-11 01:32:37 +04:00
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-prune[1]::
|
2005-12-08 03:05:21 +03:00
|
|
|
Prunes all unreachable objects from the object database.
|
2005-05-11 01:32:37 +04:00
|
|
|
|
2006-06-07 22:15:10 +04:00
|
|
|
gitlink:git-quiltimport[1]::
|
|
|
|
Applies a quilt patchset onto the current branch.
|
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-relink[1]::
|
2005-08-30 04:21:06 +04:00
|
|
|
Hardlink common objects in local repositories.
|
|
|
|
|
2006-08-04 03:28:24 +04:00
|
|
|
gitlink:git-svn[1]::
|
|
|
|
Bidirectional operation between a single Subversion branch and git.
|
|
|
|
|
2005-10-26 02:03:21 +04:00
|
|
|
gitlink:git-svnimport[1]::
|
|
|
|
Import a SVN repository into git.
|
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-sh-setup[1]::
|
2005-08-30 04:21:06 +04:00
|
|
|
Common git shell script setup code.
|
|
|
|
|
2005-10-27 13:57:44 +04:00
|
|
|
gitlink:git-symbolic-ref[1]::
|
2005-12-08 03:05:21 +03:00
|
|
|
Read and modify symbolic refs.
|
2005-10-27 13:57:44 +04:00
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-tag[1]::
|
2005-12-08 03:05:21 +03:00
|
|
|
An example script to create a tag object signed with GPG.
|
2005-05-11 01:32:37 +04:00
|
|
|
|
2005-10-26 02:03:21 +04:00
|
|
|
gitlink:git-update-ref[1]::
|
|
|
|
Update the object name stored in a ref safely.
|
|
|
|
|
2005-05-11 01:32:37 +04:00
|
|
|
|
2005-08-15 19:23:06 +04:00
|
|
|
Interrogators:
|
2005-05-11 01:32:37 +04:00
|
|
|
|
2006-03-06 08:24:44 +03:00
|
|
|
gitlink:git-annotate[1]::
|
|
|
|
Annotate file lines with commit info.
|
|
|
|
|
|
|
|
gitlink:git-blame[1]::
|
|
|
|
Blame file lines on commits.
|
|
|
|
|
2005-10-26 02:03:21 +04:00
|
|
|
gitlink:git-check-ref-format[1]::
|
|
|
|
Make sure ref name is well formed.
|
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-cherry[1]::
|
2005-08-30 04:21:06 +04:00
|
|
|
Find commits not merged upstream.
|
2005-08-27 08:33:46 +04:00
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-count-objects[1]::
|
2005-08-27 08:33:46 +04:00
|
|
|
Count unpacked number of objects and their disk consumption.
|
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-daemon[1]::
|
2005-10-11 03:01:31 +04:00
|
|
|
A really simple server for git repositories.
|
2005-09-08 01:08:38 +04:00
|
|
|
|
2006-04-13 11:09:54 +04:00
|
|
|
gitlink:git-fmt-merge-msg[1]::
|
|
|
|
Produce a merge commit message.
|
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-get-tar-commit-id[1]::
|
2005-09-08 01:08:38 +04:00
|
|
|
Extract commit ID from an archive created using git-tar-tree.
|
|
|
|
|
2006-04-13 11:09:54 +04:00
|
|
|
gitlink:git-imap-send[1]::
|
|
|
|
Dump a mailbox from stdin into an imap folder.
|
|
|
|
|
2006-08-04 03:28:24 +04:00
|
|
|
gitlink:git-instaweb[1]::
|
|
|
|
Instantly browse your working repository in gitweb.
|
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-mailinfo[1]::
|
2005-12-08 03:05:21 +03:00
|
|
|
Extracts patch and authorship information from a single
|
|
|
|
e-mail message, optionally transliterating the commit
|
|
|
|
message into utf-8.
|
2005-08-30 04:21:06 +04:00
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-mailsplit[1]::
|
2005-12-08 03:05:21 +03:00
|
|
|
A stupid program to split UNIX mbox format mailbox into
|
|
|
|
individual pieces of e-mail.
|
2005-08-30 04:21:06 +04:00
|
|
|
|
2006-04-13 11:09:54 +04:00
|
|
|
gitlink:git-merge-tree[1]::
|
|
|
|
Show three-way merge without touching index.
|
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-patch-id[1]::
|
2005-08-30 04:21:06 +04:00
|
|
|
Compute unique ID for a patch.
|
2005-05-11 01:32:37 +04:00
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-parse-remote[1]::
|
2005-12-08 03:05:21 +03:00
|
|
|
Routines to help parsing `$GIT_DIR/remotes/` files.
|
2005-09-08 01:08:38 +04:00
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-request-pull[1]::
|
2005-09-08 04:26:23 +04:00
|
|
|
git-request-pull.
|
2005-09-08 01:08:38 +04:00
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-rev-parse[1]::
|
2005-09-08 01:08:38 +04:00
|
|
|
Pick out and massage parameters.
|
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-send-email[1]::
|
2005-08-17 04:41:32 +04:00
|
|
|
Send patch e-mails out of "format-patch --mbox" output.
|
2005-05-11 01:32:37 +04:00
|
|
|
|
2006-01-03 17:38:15 +03:00
|
|
|
gitlink:git-symbolic-ref[1]::
|
2005-10-26 02:03:21 +04:00
|
|
|
Read and modify symbolic refs.
|
|
|
|
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-stripspace[1]::
|
2005-09-08 10:04:52 +04:00
|
|
|
Filter out empty lines.
|
2005-08-23 12:49:47 +04:00
|
|
|
|
|
|
|
|
2005-10-30 01:32:56 +04:00
|
|
|
Configuration Mechanism
|
|
|
|
-----------------------
|
|
|
|
|
2005-12-08 03:05:21 +03:00
|
|
|
Starting from 0.99.9 (actually mid 0.99.8.GIT), `.git/config` file
|
2005-10-30 01:32:56 +04:00
|
|
|
is used to hold per-repository configuration options. It is a
|
2006-07-09 11:44:30 +04:00
|
|
|
simple text file modeled after `.ini` format familiar to some
|
2005-10-30 01:32:56 +04:00
|
|
|
people. Here is an example:
|
|
|
|
|
|
|
|
------------
|
|
|
|
#
|
2005-12-08 03:05:21 +03:00
|
|
|
# A '#' or ';' character indicates a comment.
|
2005-10-30 01:32:56 +04:00
|
|
|
#
|
|
|
|
|
|
|
|
; core variables
|
|
|
|
[core]
|
|
|
|
; Don't trust file modes
|
|
|
|
filemode = false
|
|
|
|
|
|
|
|
; user identity
|
|
|
|
[user]
|
|
|
|
name = "Junio C Hamano"
|
|
|
|
email = "junkio@twinsun.com"
|
|
|
|
|
|
|
|
------------
|
|
|
|
|
|
|
|
Various commands read from the configuration file and adjust
|
|
|
|
their operation accordingly.
|
|
|
|
|
|
|
|
|
2005-05-22 21:44:16 +04:00
|
|
|
Identifier Terminology
|
2005-05-11 01:32:30 +04:00
|
|
|
----------------------
|
|
|
|
<object>::
|
2005-12-08 03:05:21 +03:00
|
|
|
Indicates the object name for any type of object.
|
2005-05-11 01:32:30 +04:00
|
|
|
|
|
|
|
<blob>::
|
2005-12-08 03:05:21 +03:00
|
|
|
Indicates a blob object name.
|
2005-05-11 01:32:30 +04:00
|
|
|
|
|
|
|
<tree>::
|
2005-12-08 03:05:21 +03:00
|
|
|
Indicates a tree object name.
|
2005-05-11 01:32:30 +04:00
|
|
|
|
|
|
|
<commit>::
|
2005-12-08 03:05:21 +03:00
|
|
|
Indicates a commit object name.
|
2005-05-11 01:32:30 +04:00
|
|
|
|
|
|
|
<tree-ish>::
|
2005-12-08 03:05:21 +03:00
|
|
|
Indicates a tree, commit or tag object name. A
|
2005-05-22 21:44:16 +04:00
|
|
|
command that takes a <tree-ish> argument ultimately wants to
|
|
|
|
operate on a <tree> object but automatically dereferences
|
|
|
|
<commit> and <tag> objects that point at a <tree>.
|
2005-05-11 01:32:30 +04:00
|
|
|
|
|
|
|
<type>::
|
|
|
|
Indicates that an object type is required.
|
2005-12-08 03:05:21 +03:00
|
|
|
Currently one of: `blob`, `tree`, `commit`, or `tag`.
|
2005-05-11 01:32:30 +04:00
|
|
|
|
|
|
|
<file>::
|
2005-12-08 03:05:21 +03:00
|
|
|
Indicates a filename - almost always relative to the
|
|
|
|
root of the tree structure `GIT_INDEX_FILE` describes.
|
2005-05-11 01:32:30 +04:00
|
|
|
|
2005-05-11 01:32:38 +04:00
|
|
|
Symbolic Identifiers
|
|
|
|
--------------------
|
2005-08-15 19:23:06 +04:00
|
|
|
Any git command accepting any <object> can also use the following
|
2005-05-22 21:44:16 +04:00
|
|
|
symbolic notation:
|
2005-05-11 01:32:38 +04:00
|
|
|
|
|
|
|
HEAD::
|
2005-12-08 03:05:21 +03:00
|
|
|
indicates the head of the current branch (i.e. the
|
|
|
|
contents of `$GIT_DIR/HEAD`).
|
|
|
|
|
2005-05-11 01:32:38 +04:00
|
|
|
<tag>::
|
2005-12-08 03:05:21 +03:00
|
|
|
a valid tag 'name'
|
|
|
|
(i.e. the contents of `$GIT_DIR/refs/tags/<tag>`).
|
|
|
|
|
2005-05-11 01:32:38 +04:00
|
|
|
<head>::
|
2005-12-08 03:05:21 +03:00
|
|
|
a valid head 'name'
|
|
|
|
(i.e. the contents of `$GIT_DIR/refs/heads/<head>`).
|
|
|
|
|
2006-10-25 22:33:08 +04:00
|
|
|
For a more complete list of ways to spell object names, see
|
|
|
|
"SPECIFYING REVISIONS" section in gitlink:git-rev-parse[1].
|
|
|
|
|
2005-05-11 01:32:38 +04:00
|
|
|
|
|
|
|
File/Directory Structure
|
|
|
|
------------------------
|
|
|
|
|
2005-09-02 03:56:13 +04:00
|
|
|
Please see link:repository-layout.html[repository layout] document.
|
2005-05-11 01:32:38 +04:00
|
|
|
|
2006-03-25 06:21:07 +03:00
|
|
|
Read link:hooks.html[hooks] for more details about each hook.
|
|
|
|
|
2005-05-11 01:32:38 +04:00
|
|
|
Higher level SCMs may provide and manage additional information in the
|
2005-12-08 03:05:21 +03:00
|
|
|
`$GIT_DIR`.
|
2005-05-11 01:32:38 +04:00
|
|
|
|
2005-09-02 03:56:13 +04:00
|
|
|
|
2005-05-11 01:32:30 +04:00
|
|
|
Terminology
|
|
|
|
-----------
|
2005-08-19 02:52:58 +04:00
|
|
|
Please see link:glossary.html[glossary] document.
|
2005-05-11 01:32:30 +04:00
|
|
|
|
|
|
|
|
|
|
|
Environment Variables
|
|
|
|
---------------------
|
|
|
|
Various git commands use the following environment variables:
|
|
|
|
|
2005-05-11 01:32:38 +04:00
|
|
|
The git Repository
|
|
|
|
~~~~~~~~~~~~~~~~~~
|
|
|
|
These environment variables apply to 'all' core git commands. Nb: it
|
|
|
|
is worth noting that they may be used/overridden by SCMS sitting above
|
2005-12-08 03:05:21 +03:00
|
|
|
git so take care if using Cogito etc.
|
2005-05-11 01:32:38 +04:00
|
|
|
|
|
|
|
'GIT_INDEX_FILE'::
|
|
|
|
This environment allows the specification of an alternate
|
2005-11-11 04:12:27 +03:00
|
|
|
index file. If not specified, the default of `$GIT_DIR/index`
|
|
|
|
is used.
|
2005-05-11 01:32:38 +04:00
|
|
|
|
|
|
|
'GIT_OBJECT_DIRECTORY'::
|
|
|
|
If the object storage directory is specified via this
|
|
|
|
environment variable then the sha1 directories are created
|
|
|
|
underneath - otherwise the default `$GIT_DIR/objects`
|
|
|
|
directory is used.
|
|
|
|
|
|
|
|
'GIT_ALTERNATE_OBJECT_DIRECTORIES'::
|
|
|
|
Due to the immutable nature of git objects, old objects can be
|
|
|
|
archived into shared, read-only directories. This variable
|
2005-08-15 19:23:06 +04:00
|
|
|
specifies a ":" separated list of git object directories which
|
2005-05-11 01:32:38 +04:00
|
|
|
can be used to search for git objects. New objects will not be
|
|
|
|
written to these directories.
|
|
|
|
|
|
|
|
'GIT_DIR'::
|
2005-12-08 03:05:21 +03:00
|
|
|
If the 'GIT_DIR' environment variable is set then it
|
|
|
|
specifies a path to use instead of the default `.git`
|
|
|
|
for the base of the repository.
|
2005-05-11 01:32:38 +04:00
|
|
|
|
|
|
|
git Commits
|
|
|
|
~~~~~~~~~~~
|
|
|
|
'GIT_AUTHOR_NAME'::
|
|
|
|
'GIT_AUTHOR_EMAIL'::
|
|
|
|
'GIT_AUTHOR_DATE'::
|
|
|
|
'GIT_COMMITTER_NAME'::
|
|
|
|
'GIT_COMMITTER_EMAIL'::
|
2005-09-19 14:10:51 +04:00
|
|
|
see gitlink:git-commit-tree[1]
|
2005-05-11 01:32:38 +04:00
|
|
|
|
|
|
|
git Diffs
|
|
|
|
~~~~~~~~~
|
2005-05-11 07:54:57 +04:00
|
|
|
'GIT_DIFF_OPTS'::
|
|
|
|
'GIT_EXTERNAL_DIFF'::
|
2005-05-11 01:32:38 +04:00
|
|
|
see the "generating patches" section in :
|
2005-09-19 14:10:51 +04:00
|
|
|
gitlink:git-diff-index[1];
|
|
|
|
gitlink:git-diff-files[1];
|
|
|
|
gitlink:git-diff-tree[1]
|
2005-05-11 01:32:30 +04:00
|
|
|
|
2006-06-25 17:56:18 +04:00
|
|
|
other
|
|
|
|
~~~~~
|
2006-07-31 17:27:00 +04:00
|
|
|
'GIT_PAGER'::
|
|
|
|
This environment variable overrides `$PAGER`.
|
|
|
|
|
2006-06-25 17:56:18 +04:00
|
|
|
'GIT_TRACE'::
|
2006-09-03 19:32:24 +04:00
|
|
|
If this variable is set to "1", "2" or "true" (comparison
|
|
|
|
is case insensitive), git will print `trace:` messages on
|
2006-06-25 17:56:18 +04:00
|
|
|
stderr telling about alias expansion, built-in command
|
|
|
|
execution and external command execution.
|
2006-09-03 19:32:24 +04:00
|
|
|
If this variable is set to an integer value greater than 1
|
|
|
|
and lower than 10 (strictly) then git will interpret this
|
|
|
|
value as an open file descriptor and will try to write the
|
|
|
|
trace messages into this file descriptor.
|
|
|
|
Alternatively, if this variable is set to an absolute path
|
|
|
|
(starting with a '/' character), git will interpret this
|
|
|
|
as a file path and will try to write the trace messages
|
|
|
|
into it.
|
2006-06-25 17:56:18 +04:00
|
|
|
|
2005-08-31 00:51:01 +04:00
|
|
|
Discussion[[Discussion]]
|
|
|
|
------------------------
|
2006-01-25 09:52:22 +03:00
|
|
|
include::README[]
|
2005-05-22 21:44:16 +04:00
|
|
|
|
2005-11-16 02:31:25 +03:00
|
|
|
Authors
|
|
|
|
-------
|
2005-12-13 13:38:24 +03:00
|
|
|
* git's founding father is Linus Torvalds <torvalds@osdl.org>.
|
|
|
|
* The current git nurse is Junio C Hamano <junkio@cox.net>.
|
|
|
|
* The git potty was written by Andres Ericsson <ae@op5.se>.
|
|
|
|
* General upbringing is handled by the git-list <git@vger.kernel.org>.
|
2005-05-11 01:32:30 +04:00
|
|
|
|
|
|
|
Documentation
|
|
|
|
--------------
|
2005-12-13 13:38:24 +03:00
|
|
|
The documentation for git suite was started by David Greaves
|
|
|
|
<david@dgreaves.com>, and later enhanced greatly by the
|
|
|
|
contributors on the git-list <git@vger.kernel.org>.
|
2005-05-11 01:32:30 +04:00
|
|
|
|
|
|
|
GIT
|
|
|
|
---
|
2005-09-19 14:10:51 +04:00
|
|
|
Part of the gitlink:git[7] suite
|
2005-05-11 01:32:30 +04:00
|
|
|
|