summaryrefslogtreecommitdiffstats
path: root/user-manual.html
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-01-20 15:23:19 -0800
committerJunio C Hamano <gitster@pobox.com>2016-01-20 15:23:19 -0800
commit4e6ba27c956c6c9b43e7196f210796bd1db478a9 (patch)
treeee957d01ddae17e1dcd2579467b90512aa263bb0 /user-manual.html
parenta7da1ba8da6521497f33dce9b3d2a46a857172cc (diff)
downloadgit-htmldocs-4e6ba27c956c6c9b43e7196f210796bd1db478a9.tar.gz
Autogenerated HTML docs for v2.7.0-75-g3ee1e
Diffstat (limited to 'user-manual.html')
-rw-r--r--user-manual.html35
1 files changed, 27 insertions, 8 deletions
diff --git a/user-manual.html b/user-manual.html
index c9cce44b7..f2e27c66d 100644
--- a/user-manual.html
+++ b/user-manual.html
@@ -1,5 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Git User Manual</title><link rel="stylesheet" type="text/css" href="docbook-xsl.css"><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div lang="en" class="article"><div class="titlepage"><div><div><h2 class="title"><a name="idp49277296"></a>Git User Manual</h2></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="section"><a href="#repositories-and-branches">Repositories and Branches</a></span></dt><dd><dl><dt><span class="section"><a href="#how-to-get-a-git-repository">How to get a Git repository</a></span></dt><dt><span class="section"><a href="#how-to-check-out">How to check out a different version of a project</a></span></dt><dt><span class="section"><a href="#understanding-commits">Understanding History: Commits</a></span></dt><dt><span class="section"><a href="#manipulating-branches">Manipulating branches</a></span></dt><dt><span class="section"><a href="#detached-head">Examining an old version without creating a new branch</a></span></dt><dt><span class="section"><a href="#examining-remote-branches">Examining branches from a remote repository</a></span></dt><dt><span class="section"><a href="#how-git-stores-references">Naming branches, tags, and other references</a></span></dt><dt><span class="section"><a href="#Updating-a-repository-With-git-fetch">Updating a repository with git fetch</a></span></dt><dt><span class="section"><a href="#fetching-branches">Fetching branches from other repositories</a></span></dt></dl></dd><dt><span class="section"><a href="#exploring-git-history">Exploring Git history</a></span></dt><dd><dl><dt><span class="section"><a href="#using-bisect">How to use bisect to find a regression</a></span></dt><dt><span class="section"><a href="#naming-commits">Naming commits</a></span></dt><dt><span class="section"><a href="#creating-tags">Creating tags</a></span></dt><dt><span class="section"><a href="#browsing-revisions">Browsing revisions</a></span></dt><dt><span class="section"><a href="#generating-diffs">Generating diffs</a></span></dt><dt><span class="section"><a href="#viewing-old-file-versions">Viewing old file versions</a></span></dt><dt><span class="section"><a href="#history-examples">Examples</a></span></dt></dl></dd><dt><span class="section"><a href="#Developing-With-git">Developing with Git</a></span></dt><dd><dl><dt><span class="section"><a href="#telling-git-your-name">Telling Git your name</a></span></dt><dt><span class="section"><a href="#creating-a-new-repository">Creating a new repository</a></span></dt><dt><span class="section"><a href="#how-to-make-a-commit">How to make a commit</a></span></dt><dt><span class="section"><a href="#creating-good-commit-messages">Creating good commit messages</a></span></dt><dt><span class="section"><a href="#ignoring-files">Ignoring files</a></span></dt><dt><span class="section"><a href="#how-to-merge">How to merge</a></span></dt><dt><span class="section"><a href="#resolving-a-merge">Resolving a merge</a></span></dt><dt><span class="section"><a href="#undoing-a-merge">Undoing a merge</a></span></dt><dt><span class="section"><a href="#fast-forwards">Fast-forward merges</a></span></dt><dt><span class="section"><a href="#fixing-mistakes">Fixing mistakes</a></span></dt><dt><span class="section"><a href="#ensuring-good-performance">Ensuring good performance</a></span></dt><dt><span class="section"><a href="#ensuring-reliability">Ensuring reliability</a></span></dt></dl></dd><dt><span class="section"><a href="#sharing-development">Sharing development with others</a></span></dt><dd><dl><dt><span class="section"><a href="#getting-updates-With-git-pull">Getting updates with git pull</a></span></dt><dt><span class="section"><a href="#submitting-patches">Submitting patches to a project</a></span></dt><dt><span class="section"><a href="#importing-patches">Importing patches to a project</a></span></dt><dt><span class="section"><a href="#public-repositories">Public Git repositories</a></span></dt><dt><span class="section"><a href="#sharing-development-examples">Examples</a></span></dt></dl></dd><dt><span class="section"><a href="#cleaning-up-history">Rewriting history and maintaining patch series</a></span></dt><dd><dl><dt><span class="section"><a href="#patch-series">Creating the perfect patch series</a></span></dt><dt><span class="section"><a href="#using-git-rebase">Keeping a patch series up to date using git rebase</a></span></dt><dt><span class="section"><a href="#rewriting-one-commit">Rewriting a single commit</a></span></dt><dt><span class="section"><a href="#reordering-patch-series">Reordering or selecting from a patch series</a></span></dt><dt><span class="section"><a href="#interactive-rebase">Using interactive rebases</a></span></dt><dt><span class="section"><a href="#patch-series-tools">Other tools</a></span></dt><dt><span class="section"><a href="#problems-With-rewriting-history">Problems with rewriting history</a></span></dt><dt><span class="section"><a href="#bisect-merges">Why bisecting merge commits can be harder than bisecting linear history</a></span></dt></dl></dd><dt><span class="section"><a href="#advanced-branch-management">Advanced branch management</a></span></dt><dd><dl><dt><span class="section"><a href="#fetching-individual-branches">Fetching individual branches</a></span></dt><dt><span class="section"><a href="#fetch-fast-forwards">git fetch and fast-forwards</a></span></dt><dt><span class="section"><a href="#forcing-fetch">Forcing git fetch to do non-fast-forward updates</a></span></dt><dt><span class="section"><a href="#remote-branch-configuration">Configuring remote-tracking branches</a></span></dt></dl></dd><dt><span class="section"><a href="#git-concepts">Git concepts</a></span></dt><dd><dl><dt><span class="section"><a href="#the-object-database">The Object Database</a></span></dt><dt><span class="section"><a href="#the-index">The index</a></span></dt></dl></dd><dt><span class="section"><a href="#submodules">Submodules</a></span></dt><dd><dl><dt><span class="section"><a href="#_pitfalls_with_submodules">Pitfalls with submodules</a></span></dt></dl></dd><dt><span class="section"><a href="#low-level-operations">Low-level Git operations</a></span></dt><dd><dl><dt><span class="section"><a href="#object-manipulation">Object access and manipulation</a></span></dt><dt><span class="section"><a href="#the-workflow">The Workflow</a></span></dt><dt><span class="section"><a href="#examining-the-data">Examining the data</a></span></dt><dt><span class="section"><a href="#merging-multiple-trees">Merging multiple trees</a></span></dt><dt><span class="section"><a href="#merging-multiple-trees-2">Merging multiple trees, continued</a></span></dt></dl></dd><dt><span class="section"><a href="#hacking-git">Hacking Git</a></span></dt><dd><dl><dt><span class="section"><a href="#object-details">Object storage format</a></span></dt><dt><span class="section"><a href="#birdview-on-the-source-code">A birds-eye view of Git’s source code</a></span></dt></dl></dd><dt><span class="section"><a href="#glossary">Git Glossary</a></span></dt><dt><span class="appendix"><a href="#git-quick-start">A. Git Quick Reference</a></span></dt><dd><dl><dt><span class="section"><a href="#quick-creating-a-new-repository">Creating a new repository</a></span></dt><dt><span class="section"><a href="#managing-branches">Managing branches</a></span></dt><dt><span class="section"><a href="#exploring-history">Exploring history</a></span></dt><dt><span class="section"><a href="#making-changes">Making changes</a></span></dt><dt><span class="section"><a href="#merging">Merging</a></span></dt><dt><span class="section"><a href="#sharing-your-changes">Sharing your changes</a></span></dt><dt><span class="section"><a href="#repository-maintenance">Repository maintenance</a></span></dt></dl></dd><dt><span class="appendix"><a href="#todo">B. Notes and todo list for this manual</a></span></dt></dl></div><p>Git is a fast distributed revision control system.</p><p>This manual is designed to be readable by someone with basic UNIX
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Git User Manual</title><link rel="stylesheet" type="text/css" href="docbook-xsl.css"><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div lang="en" class="article"><div class="titlepage"><div><div><h2 class="title"><a name="idp50796000"></a>Git User Manual</h2></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="section"><a href="#repositories-and-branches">Repositories and Branches</a></span></dt><dd><dl><dt><span class="section"><a href="#how-to-get-a-git-repository">How to get a Git repository</a></span></dt><dt><span class="section"><a href="#how-to-check-out">How to check out a different version of a project</a></span></dt><dt><span class="section"><a href="#understanding-commits">Understanding History: Commits</a></span></dt><dt><span class="section"><a href="#manipulating-branches">Manipulating branches</a></span></dt><dt><span class="section"><a href="#detached-head">Examining an old version without creating a new branch</a></span></dt><dt><span class="section"><a href="#examining-remote-branches">Examining branches from a remote repository</a></span></dt><dt><span class="section"><a href="#how-git-stores-references">Naming branches, tags, and other references</a></span></dt><dt><span class="section"><a href="#Updating-a-repository-With-git-fetch">Updating a repository with git fetch</a></span></dt><dt><span class="section"><a href="#fetching-branches">Fetching branches from other repositories</a></span></dt></dl></dd><dt><span class="section"><a href="#exploring-git-history">Exploring Git history</a></span></dt><dd><dl><dt><span class="section"><a href="#using-bisect">How to use bisect to find a regression</a></span></dt><dt><span class="section"><a href="#naming-commits">Naming commits</a></span></dt><dt><span class="section"><a href="#creating-tags">Creating tags</a></span></dt><dt><span class="section"><a href="#browsing-revisions">Browsing revisions</a></span></dt><dt><span class="section"><a href="#generating-diffs">Generating diffs</a></span></dt><dt><span class="section"><a href="#viewing-old-file-versions">Viewing old file versions</a></span></dt><dt><span class="section"><a href="#history-examples">Examples</a></span></dt></dl></dd><dt><span class="section"><a href="#Developing-With-git">Developing with Git</a></span></dt><dd><dl><dt><span class="section"><a href="#telling-git-your-name">Telling Git your name</a></span></dt><dt><span class="section"><a href="#creating-a-new-repository">Creating a new repository</a></span></dt><dt><span class="section"><a href="#how-to-make-a-commit">How to make a commit</a></span></dt><dt><span class="section"><a href="#creating-good-commit-messages">Creating good commit messages</a></span></dt><dt><span class="section"><a href="#ignoring-files">Ignoring files</a></span></dt><dt><span class="section"><a href="#how-to-merge">How to merge</a></span></dt><dt><span class="section"><a href="#resolving-a-merge">Resolving a merge</a></span></dt><dt><span class="section"><a href="#undoing-a-merge">Undoing a merge</a></span></dt><dt><span class="section"><a href="#fast-forwards">Fast-forward merges</a></span></dt><dt><span class="section"><a href="#fixing-mistakes">Fixing mistakes</a></span></dt><dt><span class="section"><a href="#ensuring-good-performance">Ensuring good performance</a></span></dt><dt><span class="section"><a href="#ensuring-reliability">Ensuring reliability</a></span></dt></dl></dd><dt><span class="section"><a href="#sharing-development">Sharing development with others</a></span></dt><dd><dl><dt><span class="section"><a href="#getting-updates-With-git-pull">Getting updates with git pull</a></span></dt><dt><span class="section"><a href="#submitting-patches">Submitting patches to a project</a></span></dt><dt><span class="section"><a href="#importing-patches">Importing patches to a project</a></span></dt><dt><span class="section"><a href="#public-repositories">Public Git repositories</a></span></dt><dt><span class="section"><a href="#how-to-get-a-git-repository-with-minimal-history">How to get a Git repository with minimal history</a></span></dt><dt><span class="section"><a href="#sharing-development-examples">Examples</a></span></dt></dl></dd><dt><span class="section"><a href="#cleaning-up-history">Rewriting history and maintaining patch series</a></span></dt><dd><dl><dt><span class="section"><a href="#patch-series">Creating the perfect patch series</a></span></dt><dt><span class="section"><a href="#using-git-rebase">Keeping a patch series up to date using git rebase</a></span></dt><dt><span class="section"><a href="#rewriting-one-commit">Rewriting a single commit</a></span></dt><dt><span class="section"><a href="#reordering-patch-series">Reordering or selecting from a patch series</a></span></dt><dt><span class="section"><a href="#interactive-rebase">Using interactive rebases</a></span></dt><dt><span class="section"><a href="#patch-series-tools">Other tools</a></span></dt><dt><span class="section"><a href="#problems-With-rewriting-history">Problems with rewriting history</a></span></dt><dt><span class="section"><a href="#bisect-merges">Why bisecting merge commits can be harder than bisecting linear history</a></span></dt></dl></dd><dt><span class="section"><a href="#advanced-branch-management">Advanced branch management</a></span></dt><dd><dl><dt><span class="section"><a href="#fetching-individual-branches">Fetching individual branches</a></span></dt><dt><span class="section"><a href="#fetch-fast-forwards">git fetch and fast-forwards</a></span></dt><dt><span class="section"><a href="#forcing-fetch">Forcing git fetch to do non-fast-forward updates</a></span></dt><dt><span class="section"><a href="#remote-branch-configuration">Configuring remote-tracking branches</a></span></dt></dl></dd><dt><span class="section"><a href="#git-concepts">Git concepts</a></span></dt><dd><dl><dt><span class="section"><a href="#the-object-database">The Object Database</a></span></dt><dt><span class="section"><a href="#the-index">The index</a></span></dt></dl></dd><dt><span class="section"><a href="#submodules">Submodules</a></span></dt><dd><dl><dt><span class="section"><a href="#_pitfalls_with_submodules">Pitfalls with submodules</a></span></dt></dl></dd><dt><span class="section"><a href="#low-level-operations">Low-level Git operations</a></span></dt><dd><dl><dt><span class="section"><a href="#object-manipulation">Object access and manipulation</a></span></dt><dt><span class="section"><a href="#the-workflow">The Workflow</a></span></dt><dt><span class="section"><a href="#examining-the-data">Examining the data</a></span></dt><dt><span class="section"><a href="#merging-multiple-trees">Merging multiple trees</a></span></dt><dt><span class="section"><a href="#merging-multiple-trees-2">Merging multiple trees, continued</a></span></dt></dl></dd><dt><span class="section"><a href="#hacking-git">Hacking Git</a></span></dt><dd><dl><dt><span class="section"><a href="#object-details">Object storage format</a></span></dt><dt><span class="section"><a href="#birdview-on-the-source-code">A birds-eye view of Git’s source code</a></span></dt></dl></dd><dt><span class="section"><a href="#glossary">Git Glossary</a></span></dt><dt><span class="appendix"><a href="#git-quick-start">A. Git Quick Reference</a></span></dt><dd><dl><dt><span class="section"><a href="#quick-creating-a-new-repository">Creating a new repository</a></span></dt><dt><span class="section"><a href="#managing-branches">Managing branches</a></span></dt><dt><span class="section"><a href="#exploring-history">Exploring history</a></span></dt><dt><span class="section"><a href="#making-changes">Making changes</a></span></dt><dt><span class="section"><a href="#merging">Merging</a></span></dt><dt><span class="section"><a href="#sharing-your-changes">Sharing your changes</a></span></dt><dt><span class="section"><a href="#repository-maintenance">Repository maintenance</a></span></dt></dl></dd><dt><span class="appendix"><a href="#todo">B. Notes and todo list for this manual</a></span></dt></dl></div><p>Git is a fast distributed revision control system.</p><p>This manual is designed to be readable by someone with basic UNIX
command-line skills, but no previous knowledge of Git.</p><p><a class="xref" href="#repositories-and-branches" title="Repositories and Branches">the section called “Repositories and Branches”</a> and <a class="xref" href="#exploring-git-history" title="Exploring Git history">the section called “Exploring Git history”</a> explain how
to fetch and study a project using git—read these chapters to learn how
to build and test a particular version of a software project, search for
@@ -861,8 +861,23 @@ The lack of a central group of "committers" means there is
less need for formal decisions about who is "in" and who is
"out".
</li></ul></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="setting-up-gitweb"></a>Allowing web browsing of a repository</h4></div></div></div><p>The gitweb cgi script provides users an easy way to browse your
-project’s files and history without having to install Git; see the file
-gitweb/INSTALL in the Git source tree for instructions on setting it up.</p></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="sharing-development-examples"></a>Examples</h3></div></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="maintaining-topic-branches"></a>Maintaining topic branches for a Linux subsystem maintainer</h4></div></div></div><p>This describes how Tony Luck uses Git in his role as maintainer of the
+project’s revisions, file contents and logs without having to install
+Git. Features like RSS/Atom feeds and blame/annotation details may
+optionally be enabled.</p><p>The <a class="ulink" href="git-instaweb.html" target="_top">git-instaweb(1)</a> command provides a simple way to start
+browsing the repository using gitweb. The default server when using
+instaweb is lighttpd.</p><p>See the file gitweb/INSTALL in the Git source tree and
+<a class="ulink" href="gitweb.html" target="_top">gitweb(1)</a> for instructions on details setting up a permament
+installation with a CGI or Perl capable server.</p></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="how-to-get-a-git-repository-with-minimal-history"></a>How to get a Git repository with minimal history</h3></div></div></div><p>A <a class="link" href="#def_shallow_clone">shallow clone</a>, with its truncated
+history, is useful when one is interested only in recent history
+of a project and getting full history from the upstream is
+expensive.</p><p>A <a class="link" href="#def_shallow_clone">shallow clone</a> is created by specifying
+the <a class="ulink" href="git-clone.html" target="_top">git-clone(1)</a> <code class="literal">--depth</code> switch. The depth can later be
+changed with the <a class="ulink" href="git-fetch.html" target="_top">git-fetch(1)</a> <code class="literal">--depth</code> switch, or full
+history restored with <code class="literal">--unshallow</code>.</p><p>Merging inside a <a class="link" href="#def_shallow_clone">shallow clone</a> will work as long
+as a merge base is in the recent history.
+Otherwise, it will be like merging unrelated histories and may
+have to result in huge conflicts. This limitation may make such
+a repository unsuitable to be used in merge based workflows.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="sharing-development-examples"></a>Examples</h3></div></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="maintaining-topic-branches"></a>Maintaining topic branches for a Linux subsystem maintainer</h4></div></div></div><p>This describes how Tony Luck uses Git in his role as maintainer of the
IA64 architecture for the Linux kernel.</p><p>He uses two public branches:</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
A "test" tree into which patches are initially placed so that they
can get some exposure when integrated with other ongoing development.
@@ -2506,6 +2521,12 @@ The most notable example is <code class="literal">HEAD</code>.</p></dd><dt><span
"Secure Hash Algorithm 1"; a cryptographic hash function.
In the context of Git used as a synonym for <a class="link" href="#def_object_name">object name</a>.
</dd><dt><span class="term">
+<a name="def_shallow_clone"></a>shallow clone
+</span></dt><dd>
+ Mostly a synonym to <a class="link" href="#def_shallow_repository">shallow repository</a>
+ but the phrase makes it more explicit that it was created by
+ running <code class="literal">git clone --depth=...</code> command.
+</dd><dt><span class="term">
<a name="def_shallow_repository"></a>shallow repository
</span></dt><dd>
A shallow <a class="link" href="#def_repository">repository</a> has an incomplete
@@ -2707,11 +2728,9 @@ hooks
</li><li class="listitem">
list of commands in <a class="ulink" href="git.html" target="_top">git(1)</a>
</li></ul></div><p>Scan email archives for other stuff left out</p><p>Scan man pages to see if any assume more background than this manual
-provides.</p><p>Simplify beginning by suggesting disconnected head instead of
-temporary branch creation?</p><p>Add more good examples. Entire sections of just cookbook examples
+provides.</p><p>Add more good examples. Entire sections of just cookbook examples
might be a good idea; maybe make an "advanced examples" section a
-standard end-of-chapter section?</p><p>Include cross-references to the glossary, where appropriate.</p><p>Document shallow clones? See draft 1.5.0 release notes for some
-documentation.</p><p>Add a section on working with other version control systems, including
-CVS, Subversion, and just imports of series of release tarballs.</p><p>More details on gitweb?</p><p>Write a chapter on using plumbing and writing scripts.</p><p>Alternates, clone -reference, etc.</p><p>More on recovery from repository corruption. See:
+standard end-of-chapter section?</p><p>Include cross-references to the glossary, where appropriate.</p><p>Add a section on working with other version control systems, including
+CVS, Subversion, and just imports of series of release tarballs.</p><p>Write a chapter on using plumbing and writing scripts.</p><p>Alternates, clone -reference, etc.</p><p>More on recovery from repository corruption. See:
<a class="ulink" href="http://marc.info/?l=git&amp;m=117263864820799&amp;w=2" target="_top">http://marc.info/?l=git&amp;m=117263864820799&amp;w=2</a>
<a class="ulink" href="http://marc.info/?l=git&amp;m=117147855503798&amp;w=2" target="_top">http://marc.info/?l=git&amp;m=117147855503798&amp;w=2</a></p></div></div></body></html>