git-branch \- Create a new branch, or remove an old one
.SH "SYNOPSIS"
-
-\fIgit\-branch\fR [(\-d | \-D) <branchname>] | [[\-f] <branchname> [<start\-point>]]
+.nf
+\fIgit\-branch\fR [[\-f] <branchname> [<start\-point>]]
+\fIgit\-branch\fR (\-d | \-D) <branchname>
+.fi
.SH "DESCRIPTION"
-If no argument is provided, show available branches and mark current branch with star\&. Otherwise, create a new branch of name <branchname>\&.
+If no argument is provided, show available branches and mark current branch with star\&. Otherwise, create a new branch of name <branchname>\&. If a starting point is also specified, that will be where the branch is created, otherwise it will be created at the current HEAD\&.
-If a starting point is also specified, that will be where the branch is created, otherwise it will be created at the current HEAD\&.
+With a \-d or \-D option, <branchname> will be deleted\&.
.SH "OPTIONS"
.SS "Examples"
.TP
-Start development off of a know tag
+Start development off of a known tag
.nf
$ git clone git://git\&.kernel\&.org/pub/scm/\&.\&.\&./linux\-2\&.6 my2\&.6
git-checkout \- Checkout and switch to a branch
.SH "SYNOPSIS"
-
-\fIgit\-checkout\fR [\-f] [\-b <new_branch>] [\-m] [<branch>] [<paths>...]
+.nf
+\fIgit\-checkout\fR [\-f] [\-b <new_branch>] [\-m] [<branch>]
+\fIgit\-checkout\fR [\-m] [<branch>] <paths>...
+.fi
.SH "DESCRIPTION"
-When <paths> are not given, this command switches branches, by updating the index and working tree to reflect the specified branch, <branch>, and updating HEAD to be <branch> or, if specified, <new_branch>\&.
+When <paths> are not given, this command switches branches by updating the index and working tree to reflect the specified branch, <branch>, and updating HEAD to be <branch> or, if specified, <new_branch>\&. Using \-b will cause <new_branch> to be created\&.
When <paths> are given, this command does \fInot\fR switch branches\&. It updates the named paths in the working tree from the index file (i\&.e\&. it runs git\-checkout\-index \-f \-u)\&. In this case, \-f and \-b options are meaningless and giving either of them results in an error\&. <branch> argument can be used to specify a specific tree\-ish to update the index for the given paths before updating the working tree\&.
.TP
\-f
-Force an re\-read of everything\&.
+Force a re\-read of everything\&.
.TP
\-b
.TP
\-m
-If you have local modifications to a file that is different between the current branch and the branch you are switching to, the command refuses to switch branches, to preserve your modifications in context\&. With this option, a three\-way merge between the current branch, your working tree contents, and the new branch is done, and you will be on the new branch\&.
+If you have local modifications to one or more files that are different between the current branch and the branch to which you are switching, the command refuses to switch branches in order to preserve your modifications in context\&. However, with this option, a three\-way merge between the current branch, your working tree contents, and the new branch is done, and you will be on the new branch\&.
When a merge conflict happens, the index entries for conflicting paths are left unmerged, and you need to resolve the conflicts and mark the resolved paths with git update\-index\&.
.fi
.TP
2.
-After working in a wrong branch, switching to the correct branch you would want to is done with:
+After working in a wrong branch, switching to the correct branch would be done using:
.nf
Updates the index file for given paths, or all modified files if \fI\-a\fR is specified, and makes a commit object\&. The command VISUAL and EDITOR environment variables to edit the commit log message\&.
+Several environment variable are used during commits\&. They are documented in \fBgit\-commit\-tree\fR(1)\&.
+
+
This command can run commit\-msg, pre\-commit, and post\-commit hooks\&. See hooks: \fIhooks.html\fR for more information\&.
.SH "OPTIONS"
.SH "SYNOPSIS"
-git\-init\-db [\-\-template=<template_directory>] [\-\-shared]
+\fIgit\-init\-db\fR [\-\-template=<template_directory>] [\-\-shared]
.SH "OPTIONS"
.TP
\-\-template=<template_directory>
-Provide the directory in from which templates will be used\&.
+Provide the directory from which templates will be used\&. The default template directory is /usr/share/git\-core/templates\&.
.TP
\-\-shared
.SH "DESCRIPTION"
-This simply creates an empty git repository \- basically a \&.git directory and \&.git/object/??/, \&.git/refs/heads and \&.git/refs/tags directories, and links \&.git/HEAD symbolically to \&.git/refs/heads/master\&.
+This command creates an empty git repository \- basically a \&.git directory with subdirectories for objects, refs/heads, refs/tags, and templated files\&. An initial HEAD file that references the HEAD of the master branch is also created\&.
+
+
+If \-\-template=<template_directory> is specified, <template_directory> is used as the source of the template files rather than the default\&. The template files include some directory structure, some suggested "exclude patterns", and copies of non\-executing "hook" files\&. The suggested patterns and hook files are all modifiable and extensible\&.
If the $GIT_DIR environment variable is set then it specifies a path to use instead of \&./\&.git for the base of the repository\&.
If the object storage directory is specified via the $GIT_OBJECT_DIRECTORY environment variable then the sha1 directories are created underneath \- otherwise the default $GIT_DIR/objects directory is used\&.
-A shared repository allows users belonging to the same group to push into that repository\&. When specifying \-\-shared the config variable "core\&.sharedRepository" is set to true so that directories under $GIT_DIR are made group writable (and g+sx, since the git group may be not the primary group of all users)\&.
+A shared repository allows users belonging to the same group to push into that repository\&. When specifying \-\-shared the config variable "core\&.sharedRepository" is set to \fItrue\fR so that directories under $GIT_DIR are made group writable (and g+sx, since the git group may be not the primary group of all users)\&.
Running git\-init\-db in an existing repository is safe\&. It will not overwrite things that are already there\&. The primary reason for rerunning git\-init\-db is to pick up newly added templates\&.
.TP
Start a new git repository for an existing code base
-.IP
+.nf
$ cd /path/to/my/codebase
$ git\-init\-db
$ git\-add \&.
prepare /path/to/my/codebase/\&.git directory
add all existing file to the index
+.fi
+
.SH "AUTHOR"
.fi
-From this point, the result of the following commands:
+From this point, the result of either of the following commands:
.nf
git\-rebase master
.fi
-While, starting from the same point, the result of the following commands:
+While, starting from the same point, the result of either of the following commands:
.nf
git\-rebase \-\-onto master~1 master
Upstream branch to compare against\&.
.TP
-<head>
+<branch>
Working branch; defaults to HEAD\&.
.SH "AUTHOR"
.fi
-With this,git show\-branch without extra parameters would show only the primary branches\&. In addition, if you happen to be on your topic branch, it is shown as well\&.
+With this, git show\-branch without extra parameters would show only the primary branches\&. In addition, if you happen to be on your topic branch, it is shown as well\&.
.SH "AUTHOR"
\fBgit\-shortlog\fR(1)
Summarizes \fIgit log\fR output\&.
+.TP
+\fBgit\-show\fR(1)
+Show one commit log and its diff\&.
+
.TP
\fBgit\-show\-branch\fR(1)
Show branches and their commits\&.