2005-05-20 00:24:54 +08:00
|
|
|
git(7)
|
2005-05-11 05:32:30 +08:00
|
|
|
======
|
|
|
|
|
|
|
|
NAME
|
|
|
|
----
|
|
|
|
git - the stupid content tracker
|
|
|
|
|
|
|
|
|
|
|
|
SYNOPSIS
|
|
|
|
--------
|
|
|
|
'git-<command>' <args>
|
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
-----------
|
|
|
|
|
|
|
|
This is reference information for the core git commands.
|
|
|
|
|
2005-08-24 12:18:49 +08:00
|
|
|
Before reading this cover to cover, you may want to take a look
|
|
|
|
at the link:tutorial.html[tutorial] document.
|
|
|
|
|
2005-08-31 04:51:01 +08:00
|
|
|
The <<Discussion>> section below contains much useful definition and
|
2005-05-23 01:44:16 +08:00
|
|
|
clarification info - read that first. And of the commands, I suggest
|
2005-09-19 18:10:51 +08:00
|
|
|
reading gitlink:git-update-index[1] and
|
|
|
|
gitlink:git-read-tree[1] first - I wish I had!
|
2005-05-11 05:32:30 +08:00
|
|
|
|
2005-08-31 04:51:01 +08:00
|
|
|
If you are migrating from CVS, link:cvs-migration.html[cvs migration]
|
|
|
|
document may be helpful after you finish the tutorial.
|
|
|
|
|
2005-08-25 15:28:18 +08:00
|
|
|
After you get the general feel from the tutorial and this
|
|
|
|
overview page, you may want to take a look at the
|
|
|
|
link:howto-index.html[howto] documents.
|
|
|
|
|
|
|
|
|
2005-05-11 05:32:30 +08:00
|
|
|
David Greaves <david@dgreaves.com>
|
|
|
|
08/05/05
|
|
|
|
|
|
|
|
Updated by Junio C Hamano <junkio@cox.net> on 2005-05-05 to
|
|
|
|
reflect recent changes.
|
|
|
|
|
|
|
|
Commands Overview
|
|
|
|
-----------------
|
|
|
|
The git commands can helpfully be split into those that manipulate
|
2005-07-14 15:10:48 +08:00
|
|
|
the repository, the cache and the working fileset, those that
|
|
|
|
interrogate and compare them, and those that moves objects and
|
|
|
|
references between repositories.
|
2005-05-11 05:32:30 +08:00
|
|
|
|
2005-08-09 08:39:18 +08:00
|
|
|
In addition, git itself comes with a spartan set of porcelain
|
|
|
|
commands. They are usable but are not meant to compete with real
|
|
|
|
Porcelains.
|
|
|
|
|
2005-08-15 23:23:06 +08:00
|
|
|
There are also some ancillary programs that can be viewed as useful
|
2005-05-11 05:32:37 +08:00
|
|
|
aids for using the core commands but which are unlikely to be used by
|
|
|
|
SCMs layered over git.
|
|
|
|
|
2005-05-11 05:32:30 +08:00
|
|
|
Manipulation commands
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-apply[1]::
|
2005-08-30 08:21:06 +08:00
|
|
|
Reads a "diff -up1" or git generated patch file and
|
|
|
|
applies it to the working tree.
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-checkout-index[1]::
|
2005-05-11 05:32:30 +08:00
|
|
|
Copy files from the cache to the working directory
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-commit-tree[1]::
|
2005-05-11 05:32:30 +08:00
|
|
|
Creates a new commit object
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-hash-object[1]::
|
2005-08-30 08:21:06 +08:00
|
|
|
Computes the object ID from a file.
|
|
|
|
|
2005-10-13 03:01:31 +08:00
|
|
|
gitlink:git-index-pack.html[1]::
|
|
|
|
Build pack index file for an existing packed archive.
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-init-db[1]::
|
2005-05-11 05:32:30 +08:00
|
|
|
Creates an empty git object database
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-merge-index[1]::
|
2005-08-30 08:21:06 +08:00
|
|
|
Runs a merge for files needing merging
|
2005-05-11 05:32:30 +08:00
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-mktag[1]::
|
2005-05-11 05:32:30 +08:00
|
|
|
Creates a tag object
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-pack-objects[1]::
|
2005-08-30 08:21:06 +08:00
|
|
|
Creates a packed archive of objects.
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-prune-packed[1]::
|
2005-08-30 08:21:06 +08:00
|
|
|
Remove extra objects that are already in pack files.
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-read-tree[1]::
|
2005-05-11 05:32:30 +08:00
|
|
|
Reads tree information into the directory cache
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-unpack-objects[1]::
|
2005-08-30 08:21:06 +08:00
|
|
|
Unpacks objects out of a packed archive.
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-update-index[1]::
|
2005-05-11 05:32:30 +08:00
|
|
|
Modifies the index or directory cache
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-write-tree[1]::
|
2005-05-11 05:32:30 +08:00
|
|
|
Creates a tree from the current cache
|
|
|
|
|
2005-08-16 06:48:47 +08:00
|
|
|
|
2005-05-11 05:32:30 +08:00
|
|
|
Interrogation commands
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~
|
2005-08-30 08:21:06 +08:00
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-cat-file[1]::
|
2005-05-11 05:32:30 +08:00
|
|
|
Provide content or type information for repository objects
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-diff-index[1]::
|
2005-05-11 05:32:30 +08:00
|
|
|
Compares content and mode of blobs between the cache and repository
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-diff-files[1]::
|
2005-05-11 05:32:30 +08:00
|
|
|
Compares files in the working tree and the cache
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-diff-stages[1]::
|
2005-08-17 08:41:32 +08:00
|
|
|
Compares two "merge stages" in the index file.
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-diff-tree[1]::
|
2005-08-30 08:21:06 +08:00
|
|
|
Compares the content and mode of blobs found via two tree objects
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-fsck-objects[1]::
|
2005-05-11 05:32:30 +08:00
|
|
|
Verifies the connectivity and validity of the objects in the database
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-ls-files[1]::
|
2005-05-11 05:32:30 +08:00
|
|
|
Information about files in the cache/working directory
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-ls-tree[1]::
|
2005-05-11 05:32:30 +08:00
|
|
|
Displays a tree object in human readable form
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-merge-base[1]::
|
2005-08-30 08:21:06 +08:00
|
|
|
Finds as good a common ancestor as possible for a merge
|
2005-05-11 05:32:30 +08:00
|
|
|
|
2005-10-27 17:57:44 +08:00
|
|
|
gitlink:git-name-rev[1]::
|
|
|
|
Find symbolic names for given revs
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-rev-list[1]::
|
2005-05-11 05:32:30 +08:00
|
|
|
Lists commit objects in reverse chronological order
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-show-index[1]::
|
2005-08-30 08:21:06 +08:00
|
|
|
Displays contents of a pack idx file.
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-tar-tree[1]::
|
2005-05-11 05:32:30 +08:00
|
|
|
Creates a tar archive of the files in the named tree
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-unpack-file[1]::
|
2005-05-11 05:32:30 +08:00
|
|
|
Creates a temporary file with a blob's contents
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-var[1]::
|
2005-07-15 08:55:09 +08:00
|
|
|
Displays a git logical variable
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-verify-pack[1]::
|
2005-10-11 07:01:31 +08:00
|
|
|
Validates packed git archive files
|
2005-06-29 17:51:27 +08:00
|
|
|
|
2005-05-11 05:32:30 +08:00
|
|
|
The interrogate commands may create files - and you can force them to
|
|
|
|
touch the working file set - but in general they don't
|
|
|
|
|
|
|
|
|
2005-07-16 15:17:42 +08:00
|
|
|
Synching repositories
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-clone-pack[1]::
|
2005-07-14 11:25:54 +08:00
|
|
|
Clones a repository into the current repository (engine
|
|
|
|
for ssh and local transport)
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-fetch-pack[1]::
|
2005-08-30 08:21:06 +08:00
|
|
|
Updates from a remote repository.
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-http-fetch[1]::
|
2005-10-11 07:01:31 +08:00
|
|
|
Downloads a remote git repository via HTTP
|
2005-05-11 05:32:37 +08:00
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-local-fetch[1]::
|
2005-10-11 07:01:31 +08:00
|
|
|
Duplicates another git repository on a local system
|
2005-05-11 05:32:37 +08:00
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-peek-remote[1]::
|
2005-08-30 08:21:06 +08:00
|
|
|
Lists references on a remote repository using upload-pack protocol.
|
2005-07-14 15:10:48 +08:00
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-receive-pack[1]::
|
2005-07-14 15:10:48 +08:00
|
|
|
Invoked by 'git-send-pack' to receive what is pushed to it.
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-send-pack[1]::
|
2005-08-30 08:21:06 +08:00
|
|
|
Pushes to a remote repository, intelligently.
|
2005-07-14 15:10:48 +08:00
|
|
|
|
2005-10-26 05:43:30 +08:00
|
|
|
gitlink:git-shell[1]::
|
|
|
|
Restricted shell for GIT-only SSH access.
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-ssh-fetch[1]::
|
2005-08-30 08:21:06 +08:00
|
|
|
Pulls from a remote repository over ssh connection
|
2005-07-24 08:54:15 +08:00
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-ssh-upload[1]::
|
2005-09-08 08:26:23 +08:00
|
|
|
Helper "server-side" program used by git-ssh-fetch
|
2005-07-14 15:10:48 +08:00
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-update-server-info[1]::
|
2005-07-24 08:54:56 +08:00
|
|
|
Updates auxiliary information on a dumb server to help
|
|
|
|
clients discover references and packs on it.
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-upload-pack[1]::
|
2005-08-30 08:21:06 +08:00
|
|
|
Invoked by 'git-clone-pack' and 'git-fetch-pack' to push
|
|
|
|
what are asked for.
|
|
|
|
|
2005-07-14 15:10:48 +08:00
|
|
|
|
2005-08-15 08:24:36 +08:00
|
|
|
Porcelain-ish Commands
|
|
|
|
----------------------
|
2005-08-27 12:33:46 +08:00
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-add[1]::
|
2005-08-27 12:33:46 +08:00
|
|
|
Add paths to the index file.
|
|
|
|
|
2005-10-26 06:03:21 +08:00
|
|
|
gitlink:git-am[1]::
|
|
|
|
Apply patches from a mailbox, but cooler.
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-applymbox[1]::
|
2005-08-30 08:21:06 +08:00
|
|
|
Apply patches from a mailbox.
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-bisect[1]::
|
2005-08-30 08:21:06 +08:00
|
|
|
Find the change that introduced a bug.
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-branch[1]::
|
2005-08-27 12:33:46 +08:00
|
|
|
Create and Show branches.
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-checkout[1]::
|
2005-09-08 05:28:21 +08:00
|
|
|
Checkout and switch to a branch.
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-cherry-pick[1]::
|
2005-08-30 08:21:06 +08:00
|
|
|
Cherry-pick the effect of an existing commit.
|
2005-08-15 08:24:36 +08:00
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-clone[1]::
|
2005-08-30 08:21:06 +08:00
|
|
|
Clones a repository into a new directory.
|
2005-08-15 08:24:36 +08:00
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-commit[1]::
|
2005-08-30 08:21:06 +08:00
|
|
|
Record changes to the repository.
|
2005-08-15 08:24:36 +08:00
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-diff[1]::
|
2005-09-13 10:39:15 +08:00
|
|
|
Show changes between commits, commit and working tree, etc.
|
2005-09-08 14:04:52 +08:00
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-fetch[1]::
|
2005-08-09 08:39:18 +08:00
|
|
|
Download from a remote repository via various protocols.
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-format-patch[1]::
|
2005-09-13 10:39:15 +08:00
|
|
|
Prepare patches for e-mail submission.
|
2005-09-08 14:04:52 +08:00
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-grep[1]::
|
2005-09-13 10:39:15 +08:00
|
|
|
Print lines matching a pattern
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-log[1]::
|
2005-08-30 08:21:06 +08:00
|
|
|
Shows commit logs.
|
2005-08-09 08:39:18 +08:00
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-ls-remote[1]::
|
2005-08-30 08:21:06 +08:00
|
|
|
Shows references in a remote or local repository.
|
2005-08-25 07:23:08 +08:00
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-merge[1]::
|
2005-09-09 16:15:47 +08:00
|
|
|
Grand unified merge driver.
|
|
|
|
|
2005-10-26 06:03:21 +08:00
|
|
|
gitlink:git-mv[1]::
|
|
|
|
Move or rename a file, a directory, or a symlink.
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-octopus[1]::
|
2005-08-25 07:23:08 +08:00
|
|
|
Merge more than two commits.
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-pull[1]::
|
2005-08-30 08:21:06 +08:00
|
|
|
Fetch from and merge with a remote repository.
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-push[1]::
|
2005-08-25 07:23:08 +08:00
|
|
|
Update remote refs along with associated objects.
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-rebase[1]::
|
2005-08-30 08:21:06 +08:00
|
|
|
Rebase local commits to new upstream head.
|
2005-08-09 08:39:18 +08:00
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-rename[1]::
|
2005-08-30 08:21:06 +08:00
|
|
|
Rename files and directories.
|
2005-08-09 08:39:18 +08:00
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-repack[1]::
|
2005-08-16 06:48:47 +08:00
|
|
|
Pack unpacked objects in a repository.
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-reset[1]::
|
2005-09-08 05:28:21 +08:00
|
|
|
Reset current HEAD to the specified state.
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-resolve[1]::
|
2005-08-30 08:21:06 +08:00
|
|
|
Merge two commits.
|
2005-08-17 08:41:32 +08:00
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-revert[1]::
|
2005-08-30 08:21:06 +08:00
|
|
|
Revert an existing commit.
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-shortlog[1]::
|
2005-08-30 08:21:06 +08:00
|
|
|
Summarizes 'git log' output.
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-show-branch[1]::
|
2005-08-30 08:21:06 +08:00
|
|
|
Show branches and their commits.
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-status[1]::
|
2005-08-30 08:21:06 +08:00
|
|
|
Shows the working tree status.
|
2005-08-17 08:41:32 +08:00
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-verify-tag[1]::
|
2005-08-27 12:33:46 +08:00
|
|
|
Check the GPG signature of tag.
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-whatchanged[1]::
|
2005-08-30 08:21:06 +08:00
|
|
|
Shows commit logs and differences they introduce.
|
|
|
|
|
2005-08-16 06:48:47 +08:00
|
|
|
|
2005-08-15 23:23:06 +08:00
|
|
|
Ancillary Commands
|
|
|
|
------------------
|
2005-07-14 15:10:48 +08:00
|
|
|
Manipulators:
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-applypatch[1]::
|
2005-08-30 08:21:06 +08:00
|
|
|
Apply one patch extracted from an e-mail.
|
2005-08-27 12:33:46 +08:00
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-archimport[1]::
|
2005-09-08 05:08:38 +08:00
|
|
|
Import an arch repository into git.
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-convert-objects[1]::
|
2005-10-11 07:01:31 +08:00
|
|
|
Converts old-style git repository
|
2005-07-14 15:10:48 +08:00
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-cvsimport[1]::
|
2005-08-30 08:21:06 +08:00
|
|
|
Salvage your data out of another SCM people love to hate.
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-merge-one-file[1]::
|
2005-09-08 08:26:23 +08:00
|
|
|
The standard helper program to use with "git-merge-index"
|
2005-05-11 05:32:37 +08:00
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-prune[1]::
|
2005-05-11 05:32:37 +08:00
|
|
|
Prunes all unreachable objects from the object database
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-relink[1]::
|
2005-08-30 08:21:06 +08:00
|
|
|
Hardlink common objects in local repositories.
|
|
|
|
|
2005-10-26 06:03:21 +08:00
|
|
|
gitlink:git-svnimport[1]::
|
|
|
|
Import a SVN repository into git.
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-sh-setup[1]::
|
2005-08-30 08:21:06 +08:00
|
|
|
Common git shell script setup code.
|
|
|
|
|
2005-10-27 17:57:44 +08:00
|
|
|
gitlink:git-symbolic-ref[1]::
|
|
|
|
Read and modify symbolic refs
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-tag[1]::
|
2005-05-11 05:32:37 +08:00
|
|
|
An example script to create a tag object signed with GPG
|
|
|
|
|
2005-10-26 06:03:21 +08:00
|
|
|
gitlink:git-update-ref[1]::
|
|
|
|
Update the object name stored in a ref safely.
|
|
|
|
|
2005-05-11 05:32:37 +08:00
|
|
|
|
2005-08-15 23:23:06 +08:00
|
|
|
Interrogators:
|
2005-05-11 05:32:37 +08:00
|
|
|
|
2005-10-26 06:03:21 +08:00
|
|
|
gitlink:git-check-ref-format[1]::
|
|
|
|
Make sure ref name is well formed.
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-cherry[1]::
|
2005-08-30 08:21:06 +08:00
|
|
|
Find commits not merged upstream.
|
2005-08-27 12:33:46 +08:00
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-count-objects[1]::
|
2005-08-27 12:33:46 +08:00
|
|
|
Count unpacked number of objects and their disk consumption.
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-daemon[1]::
|
2005-10-11 07:01:31 +08:00
|
|
|
A really simple server for git repositories.
|
2005-09-08 05:08:38 +08:00
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-get-tar-commit-id[1]::
|
2005-09-08 05:08:38 +08:00
|
|
|
Extract commit ID from an archive created using git-tar-tree.
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-mailinfo[1]::
|
2005-08-30 08:21:06 +08:00
|
|
|
Extracts patch from a single e-mail message.
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-mailsplit[1]::
|
2005-08-30 08:21:06 +08:00
|
|
|
git-mailsplit.
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-patch-id[1]::
|
2005-08-30 08:21:06 +08:00
|
|
|
Compute unique ID for a patch.
|
2005-05-11 05:32:37 +08:00
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-parse-remote[1]::
|
2005-09-08 05:08:38 +08:00
|
|
|
Routines to help parsing $GIT_DIR/remotes/
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-request-pull[1]::
|
2005-09-08 08:26:23 +08:00
|
|
|
git-request-pull.
|
2005-09-08 05:08:38 +08:00
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-rev-parse[1]::
|
2005-09-08 05:08:38 +08:00
|
|
|
Pick out and massage parameters.
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-send-email[1]::
|
2005-08-17 08:41:32 +08:00
|
|
|
Send patch e-mails out of "format-patch --mbox" output.
|
2005-05-11 05:32:37 +08:00
|
|
|
|
2005-10-26 06:03:21 +08:00
|
|
|
gitlink:git-symbolic-refs[1]::
|
|
|
|
Read and modify symbolic refs.
|
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-stripspace[1]::
|
2005-09-08 14:04:52 +08:00
|
|
|
Filter out empty lines.
|
2005-08-23 16:49:47 +08:00
|
|
|
|
|
|
|
|
2005-09-08 14:04:52 +08:00
|
|
|
Commands not yet documented
|
|
|
|
---------------------------
|
2005-08-23 16:49:47 +08:00
|
|
|
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:gitk[1]::
|
2005-08-23 16:49:47 +08:00
|
|
|
gitk.
|
|
|
|
|
|
|
|
|
2005-10-30 05:32:56 +08:00
|
|
|
Configuration Mechanism
|
|
|
|
-----------------------
|
|
|
|
|
|
|
|
Starting from 0.99.9 (actually mid 0.99.8.GIT), .git/config file
|
|
|
|
is used to hold per-repository configuration options. It is a
|
|
|
|
simple text file modelled after `.ini` format familiar to some
|
|
|
|
people. Here is an example:
|
|
|
|
|
|
|
|
------------
|
|
|
|
#
|
|
|
|
# This is the config file, and
|
|
|
|
# a '#' or ';' character indicates
|
|
|
|
# a comment
|
|
|
|
#
|
|
|
|
|
|
|
|
; 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-23 01:44:16 +08:00
|
|
|
Identifier Terminology
|
2005-05-11 05:32:30 +08:00
|
|
|
----------------------
|
|
|
|
<object>::
|
2005-05-23 01:44:16 +08:00
|
|
|
Indicates the sha1 identifier for any type of object
|
2005-05-11 05:32:30 +08:00
|
|
|
|
|
|
|
<blob>::
|
|
|
|
Indicates a blob object sha1 identifier
|
|
|
|
|
|
|
|
<tree>::
|
|
|
|
Indicates a tree object sha1 identifier
|
|
|
|
|
|
|
|
<commit>::
|
|
|
|
Indicates a commit object sha1 identifier
|
|
|
|
|
|
|
|
<tree-ish>::
|
2005-05-23 01:44:16 +08:00
|
|
|
Indicates a tree, commit or tag object sha1 identifier. A
|
|
|
|
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 05:32:30 +08:00
|
|
|
|
|
|
|
<type>::
|
|
|
|
Indicates that an object type is required.
|
|
|
|
Currently one of: blob/tree/commit/tag
|
|
|
|
|
|
|
|
<file>::
|
|
|
|
Indicates a filename - always relative to the root of
|
|
|
|
the tree structure GIT_INDEX_FILE describes.
|
|
|
|
|
2005-05-11 05:32:38 +08:00
|
|
|
Symbolic Identifiers
|
|
|
|
--------------------
|
2005-08-15 23:23:06 +08:00
|
|
|
Any git command accepting any <object> can also use the following
|
2005-05-23 01:44:16 +08:00
|
|
|
symbolic notation:
|
2005-05-11 05:32:38 +08:00
|
|
|
|
|
|
|
HEAD::
|
2005-05-23 01:44:16 +08:00
|
|
|
indicates the head of the repository (ie the contents of
|
|
|
|
`$GIT_DIR/HEAD`)
|
2005-05-11 05:32:38 +08:00
|
|
|
<tag>::
|
|
|
|
a valid tag 'name'+
|
|
|
|
(ie the contents of `$GIT_DIR/refs/tags/<tag>`)
|
|
|
|
<head>::
|
|
|
|
a valid head 'name'+
|
|
|
|
(ie the contents of `$GIT_DIR/refs/heads/<head>`)
|
|
|
|
<snap>::
|
|
|
|
a valid snapshot 'name'+
|
|
|
|
(ie the contents of `$GIT_DIR/refs/snap/<snap>`)
|
|
|
|
|
|
|
|
|
|
|
|
File/Directory Structure
|
|
|
|
------------------------
|
|
|
|
|
2005-09-02 07:56:13 +08:00
|
|
|
Please see link:repository-layout.html[repository layout] document.
|
2005-05-11 05:32:38 +08:00
|
|
|
|
|
|
|
Higher level SCMs may provide and manage additional information in the
|
|
|
|
GIT_DIR.
|
|
|
|
|
2005-09-02 07:56:13 +08:00
|
|
|
|
2005-05-11 05:32:30 +08:00
|
|
|
Terminology
|
|
|
|
-----------
|
2005-08-19 06:52:58 +08:00
|
|
|
Please see link:glossary.html[glossary] document.
|
2005-05-11 05:32:30 +08:00
|
|
|
|
|
|
|
|
|
|
|
Environment Variables
|
|
|
|
---------------------
|
|
|
|
Various git commands use the following environment variables:
|
|
|
|
|
2005-05-11 05:32:38 +08: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
|
|
|
|
git so take care if using Cogito etc
|
|
|
|
|
|
|
|
'GIT_INDEX_FILE'::
|
|
|
|
This environment allows the specification of an alternate
|
|
|
|
cache/index file. If not specified, the default of
|
|
|
|
`$GIT_DIR/index` is used.
|
|
|
|
|
|
|
|
'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 23:23:06 +08:00
|
|
|
specifies a ":" separated list of git object directories which
|
2005-05-11 05:32:38 +08:00
|
|
|
can be used to search for git objects. New objects will not be
|
|
|
|
written to these directories.
|
|
|
|
|
|
|
|
'GIT_DIR'::
|
|
|
|
If the 'GIT_DIR' environment variable is set then it specifies
|
|
|
|
a path to use instead of `./.git` for the base of the
|
|
|
|
repository.
|
|
|
|
|
|
|
|
git Commits
|
|
|
|
~~~~~~~~~~~
|
|
|
|
'GIT_AUTHOR_NAME'::
|
|
|
|
'GIT_AUTHOR_EMAIL'::
|
|
|
|
'GIT_AUTHOR_DATE'::
|
|
|
|
'GIT_COMMITTER_NAME'::
|
|
|
|
'GIT_COMMITTER_EMAIL'::
|
2005-09-19 18:10:51 +08:00
|
|
|
see gitlink:git-commit-tree[1]
|
2005-05-11 05:32:38 +08:00
|
|
|
|
|
|
|
git Diffs
|
|
|
|
~~~~~~~~~
|
2005-05-11 11:54:57 +08:00
|
|
|
'GIT_DIFF_OPTS'::
|
|
|
|
'GIT_EXTERNAL_DIFF'::
|
2005-05-11 05:32:38 +08:00
|
|
|
see the "generating patches" section in :
|
2005-09-19 18:10:51 +08:00
|
|
|
gitlink:git-diff-index[1];
|
|
|
|
gitlink:git-diff-files[1];
|
|
|
|
gitlink:git-diff-tree[1]
|
2005-05-11 05:32:30 +08:00
|
|
|
|
2005-08-31 04:51:01 +08:00
|
|
|
Discussion[[Discussion]]
|
|
|
|
------------------------
|
2005-05-23 01:44:16 +08:00
|
|
|
include::../README[]
|
|
|
|
|
2005-05-11 05:32:30 +08:00
|
|
|
Author
|
|
|
|
------
|
2005-05-23 01:44:16 +08:00
|
|
|
Written by Linus Torvalds <torvalds@osdl.org> and the git-list <git@vger.kernel.org>.
|
2005-05-11 05:32:30 +08:00
|
|
|
|
|
|
|
Documentation
|
|
|
|
--------------
|
|
|
|
Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>.
|
|
|
|
|
|
|
|
GIT
|
|
|
|
---
|
2005-09-19 18:10:51 +08:00
|
|
|
Part of the gitlink:git[7] suite
|
2005-05-11 05:32:30 +08:00
|
|
|
|