Whether to include summaries of merged commits in newly created
merge commit messages. False by default.
+merge.verbosity::
+ Controls the amount of output shown by the recursive merge
+ strategy. Level 0 outputs nothing except a final error
+ message if conflicts were detected. Level 1 outputs only
+ conflicts, 2 outputs conflicts and file changes. Level 5 and
+ above outputs debugging information. The default is level 2.
+
pack.window::
The size of the window used by gitlink:git-pack-objects[1] when no
window size is given on the command line. Defaults to 10.
file, which had no differences in the <tt>mybranch</tt> branch), and say:</p>\r
<div class="listingblock">\r
<div class="content">\r
-<pre><tt> Trying really trivial in-index merge...\r
- fatal: Merge requires file-level merging\r
- Nope.\r
- ...\r
- Auto-merging hello\r
+<pre><tt> Auto-merging hello\r
CONFLICT (content): Merge conflict in hello\r
Automatic merge failed; fix up by hand</tt></pre>\r
</div></div>\r
-<p>which is way too verbose, but it basically tells you that it failed the\r
-really trivial merge ("Simple merge") and did an "Automatic merge"\r
-instead, but that too failed due to conflicts in <tt>hello</tt>.</p>\r
+<p>It tells you that it did an "Automatic merge", which\r
+failed due to conflicts in <tt>hello</tt>.</p>\r
<p>Not to worry. It left the (trivial) conflict in <tt>hello</tt> in the same form you\r
should already be well used to if you've ever used CVS, so let's just\r
open <tt>hello</tt> in our editor (whatever that may be), and fix it up somehow.\r
multiple working trees, but disk space is cheap these days.</td>\r
</tr></table>\r
</div>\r
-<div class="admonitionblock">\r
-<table><tr>\r
-<td class="icon">\r
-<div class="title">Note</div>\r
-</td>\r
-<td class="content">You could even pull from your own repository by\r
-giving <em>.</em> as <remote-repository> parameter to <tt>git pull</tt>. This\r
-is useful when you want to merge a local branch (or more, if you\r
-are making an Octopus) into the current branch.</td>\r
-</tr></table>\r
-</div>\r
<p>It is likely that you will be pulling from the same remote\r
repository from time to time. As a short hand, you can store\r
-the remote repository URL in a file under .git/remotes/\r
-directory, like this:</p>\r
-<div class="listingblock">\r
-<div class="content">\r
-<pre><tt>$ mkdir -p .git/remotes/\r
-$ cat >.git/remotes/linus <<\EOF\r
-URL: http://www.kernel.org/pub/scm/git/git.git/\r
-EOF</tt></pre>\r
-</div></div>\r
-<p>and use the filename to <tt>git pull</tt> instead of the full URL.\r
-The URL specified in such file can even be a prefix\r
-of a full URL, like this:</p>\r
+the remote repository URL in the local repository's config file\r
+like this:</p>\r
<div class="listingblock">\r
<div class="content">\r
-<pre><tt>$ cat >.git/remotes/jgarzik <<\EOF\r
-URL: http://www.kernel.org/pub/scm/linux/git/jgarzik/\r
-EOF</tt></pre>\r
+<pre><tt>$ git repo-config remote.linus.url http://www.kernel.org/pub/scm/git/git.git/</tt></pre>\r
</div></div>\r
+<p>and use the "linus" keyword with <tt>git pull</tt> instead of the full URL.</p>\r
<p>Examples.</p>\r
<ol>\r
<li>\r
<tt>git pull linus tag v0.99.1</tt>\r
</p>\r
</li>\r
-<li>\r
-<p>\r
-<tt>git pull jgarzik/netdev-2.6.git/ e100</tt>\r
-</p>\r
-</li>\r
</ol>\r
<p>the above are equivalent to:</p>\r
<ol>\r
<tt>git pull http://www.kernel.org/pub/scm/git/git.git/ tag v0.99.1</tt>\r
</p>\r
</li>\r
-<li>\r
-<p>\r
-<tt>git pull http://www.kernel.org/pub/…/jgarzik/netdev-2.6.git e100</tt>\r
-</p>\r
-</li>\r
</ol>\r
</div>\r
<h2>How does the merge work?</h2>\r
<p>\r
Prepare your work repository, by <tt>git clone</tt> the public\r
repository of the "project lead". The URL used for the\r
- initial cloning is stored in <tt>.git/remotes/origin</tt>.\r
+ initial cloning is stored in the remote.origin.url\r
+ configuration variable.\r
</p>\r
</li>\r
<li>\r
Prepare your work repository, by <tt>git clone</tt> the public\r
repository of the "project lead" (or a "subsystem\r
maintainer", if you work on a subsystem). The URL used for\r
- the initial cloning is stored in <tt>.git/remotes/origin</tt>.\r
+ the initial cloning is stored in the remote.origin.url\r
+ configuration variable.\r
</p>\r
</li>\r
<li>\r
Run <tt>git fetch origin</tt> from the public repository of your\r
upstream every once in a while. This does only the first\r
half of <tt>git pull</tt> but does not merge. The head of the\r
- public repository is stored in <tt>.git/refs/heads/origin</tt>.\r
+ public repository is stored in <tt>.git/refs/remotes/origin/master</tt>.\r
</p>\r
</li>\r
<li>\r
</div></div>\r
<p>You can make sure <em>git show-branch</em> matches the state before\r
those two <em>git merge</em> you just did. Then, instead of running\r
-two <em>git merge</em> commands in a row, you would pull these two\r
+two <em>git merge</em> commands in a row, you would merge these two\r
branch heads (this is known as <em>making an Octopus</em>):</p>\r
<div class="listingblock">\r
<div class="content">\r
-<pre><tt>$ git pull . commit-fix diff-fix\r
+<pre><tt>$ git merge commit-fix diff-fix\r
$ git show-branch\r
! [commit-fix] Fix commit message normalization.\r
! [diff-fix] Fix rename detection.\r
</div></div>\r
<p>Note that you should not do Octopus because you can. An octopus\r
is a valid thing to do and often makes it easier to view the\r
-commit history if you are pulling more than two independent\r
+commit history if you are merging more than two independent\r
changes at the same time. However, if you have merge conflicts\r
with any of the branches you are merging in and need to hand\r
resolve, that is an indication that the development happened in\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 13-Jan-2007 08:09:05 UTC\r
+Last updated 15-Jan-2007 06:12:35 UTC\r
</div>\r
</div>\r
</body>\r
file, which had no differences in the `mybranch` branch), and say:
----------------
- Trying really trivial in-index merge...
- fatal: Merge requires file-level merging
- Nope.
- ...
Auto-merging hello
CONFLICT (content): Merge conflict in hello
Automatic merge failed; fix up by hand
----------------
-which is way too verbose, but it basically tells you that it failed the
-really trivial merge ("Simple merge") and did an "Automatic merge"
-instead, but that too failed due to conflicts in `hello`.
+It tells you that it did an "Automatic merge", which
+failed due to conflicts in `hello`.
Not to worry. It left the (trivial) conflict in `hello` in the same form you
should already be well used to if you've ever used CVS, so let's just
course, you will pay the price of more disk usage to hold
multiple working trees, but disk space is cheap these days.
-[NOTE]
-You could even pull from your own repository by
-giving '.' as <remote-repository> parameter to `git pull`. This
-is useful when you want to merge a local branch (or more, if you
-are making an Octopus) into the current branch.
-
It is likely that you will be pulling from the same remote
repository from time to time. As a short hand, you can store
-the remote repository URL in a file under .git/remotes/
-directory, like this:
-
-------------------------------------------------
-$ mkdir -p .git/remotes/
-$ cat >.git/remotes/linus <<\EOF
-URL: http://www.kernel.org/pub/scm/git/git.git/
-EOF
-------------------------------------------------
-
-and use the filename to `git pull` instead of the full URL.
-The URL specified in such file can even be a prefix
-of a full URL, like this:
+the remote repository URL in the local repository's config file
+like this:
------------------------------------------------
-$ cat >.git/remotes/jgarzik <<\EOF
-URL: http://www.kernel.org/pub/scm/linux/git/jgarzik/
-EOF
+$ git repo-config remote.linus.url http://www.kernel.org/pub/scm/git/git.git/
------------------------------------------------
+and use the "linus" keyword with `git pull` instead of the full URL.
Examples.
. `git pull linus`
. `git pull linus tag v0.99.1`
-. `git pull jgarzik/netdev-2.6.git/ e100`
the above are equivalent to:
. `git pull http://www.kernel.org/pub/scm/git/git.git/ HEAD`
. `git pull http://www.kernel.org/pub/scm/git/git.git/ tag v0.99.1`
-. `git pull http://www.kernel.org/pub/.../jgarzik/netdev-2.6.git e100`
How does the merge work?
1. Prepare your work repository, by `git clone` the public
repository of the "project lead". The URL used for the
- initial cloning is stored in `.git/remotes/origin`.
+ initial cloning is stored in the remote.origin.url
+ configuration variable.
2. Prepare a public repository accessible to others, just like
the "project lead" person does.
1. Prepare your work repository, by `git clone` the public
repository of the "project lead" (or a "subsystem
maintainer", if you work on a subsystem). The URL used for
- the initial cloning is stored in `.git/remotes/origin`.
+ the initial cloning is stored in the remote.origin.url
+ configuration variable.
2. Do your work in your repository on 'master' branch.
3. Run `git fetch origin` from the public repository of your
upstream every once in a while. This does only the first
half of `git pull` but does not merge. The head of the
- public repository is stored in `.git/refs/heads/origin`.
+ public repository is stored in `.git/refs/remotes/origin/master`.
4. Use `git cherry origin` to see which ones of your patches
were accepted, and/or use `git rebase origin` to port your
You can make sure 'git show-branch' matches the state before
those two 'git merge' you just did. Then, instead of running
-two 'git merge' commands in a row, you would pull these two
+two 'git merge' commands in a row, you would merge these two
branch heads (this is known as 'making an Octopus'):
------------
-$ git pull . commit-fix diff-fix
+$ git merge commit-fix diff-fix
$ git show-branch
! [commit-fix] Fix commit message normalization.
! [diff-fix] Fix rename detection.
Note that you should not do Octopus because you can. An octopus
is a valid thing to do and often makes it easier to view the
-commit history if you are pulling more than two independent
+commit history if you are merging more than two independent
changes at the same time. However, if you have merge conflicts
with any of the branches you are merging in and need to hand
resolve, that is an indication that the development happened in
</li>\r
<li>\r
<p>\r
-merge a topic branch into your master branch. You can also use\r
-<tt>git pull . alsa-audio</tt>, i.e. pull from the local repository.\r
+merge a topic branch into your master branch.\r
</p>\r
</li>\r
<li>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 08-Jan-2007 06:53:25 UTC\r
+Last updated 15-Jan-2007 06:12:37 UTC\r
</div>\r
</div>\r
</body>\r
<8> redo the commit undone in the previous step, using the message
you originally wrote.
<9> switch to the master branch.
-<10> merge a topic branch into your master branch. You can also use
-`git pull . alsa-audio`, i.e. pull from the local repository.
+<10> merge a topic branch into your master branch.
<11> review commit logs; other forms to limit output can be
combined and include `\--max-count=10` (show 10 commits),
`\--until=2005-12-10`, etc.
abbreviated object name, use <n> digits.\r
</p>\r
</dd>\r
+<dt>\r
+--candidates=<n>\r
+</dt>\r
+<dd>\r
+<p>\r
+ Instead of considering only the 10 most recent tags as\r
+ candidates to describe the input committish consider\r
+ up to <n> candidates. Increasing <n> above 10 will take\r
+ slightly longer but may produce a more accurate result.\r
+</p>\r
+</dd>\r
+<dt>\r
+--debug\r
+</dt>\r
+<dd>\r
+<p>\r
+ Verbosely display information about the searching strategy\r
+ being employed to standard error. The tag name will still\r
+ be printed to standard out.\r
+</p>\r
+</dd>\r
</dl>\r
</div>\r
<h2>EXAMPLES</h2>\r
heads/lt/describe-g975b</tt></pre>\r
</div></div>\r
</div>\r
+<h2>SEARCH STRATEGY</h2>\r
+<div class="sectionbody">\r
+<p>For each committish supplied "git describe" will first look for\r
+a tag which tags exactly that commit. Annotated tags will always\r
+be preferred over lightweight tags, and tags with newer dates will\r
+always be preferred over tags with older dates. If an exact match\r
+is found, its name will be output and searching will stop.</p>\r
+<p>If an exact match was not found "git describe" will walk back\r
+through the commit history to locate an ancestor commit which\r
+has been tagged. The ancestor's tag will be output along with an\r
+abbreviation of the input committish's SHA1.</p>\r
+<p>If multiple tags were found during the walk then the tag which\r
+has the fewest commits different from the input committish will be\r
+selected and output. Here fewest commits different is defined as\r
+the number of commits which would be shown by "git log tag..input"\r
+will be the smallest number of commits possible.</p>\r
+</div>\r
<h2>Author</h2>\r
<div class="sectionbody">\r
<p>Written by Linus Torvalds <torvalds@osdl.org>, but somewhat\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 03-Oct-2006 08:41:00 UTC\r
+Last updated 15-Jan-2007 06:12:30 UTC\r
</div>\r
</div>\r
</body>\r
Instead of using the default 8 hexadecimal digits as the
abbreviated object name, use <n> digits.
+--candidates=<n>::
+ Instead of considering only the 10 most recent tags as
+ candidates to describe the input committish consider
+ up to <n> candidates. Increasing <n> above 10 will take
+ slightly longer but may produce a more accurate result.
+
+--debug::
+ Verbosely display information about the searching strategy
+ being employed to standard error. The tag name will still
+ be printed to standard out.
EXAMPLES
--------
[torvalds@g5 git]$ git describe --all HEAD^
heads/lt/describe-g975b
+SEARCH STRATEGY
+---------------
+
+For each committish supplied "git describe" will first look for
+a tag which tags exactly that commit. Annotated tags will always
+be preferred over lightweight tags, and tags with newer dates will
+always be preferred over tags with older dates. If an exact match
+is found, its name will be output and searching will stop.
+
+If an exact match was not found "git describe" will walk back
+through the commit history to locate an ancestor commit which
+has been tagged. The ancestor's tag will be output along with an
+abbreviation of the input committish's SHA1.
+
+If multiple tags were found during the walk then the tag which
+has the fewest commits different from the input committish will be
+selected and output. Here fewest commits different is defined as
+the number of commits which would be shown by "git log tag..input"
+will be the smallest number of commits possible.
+
Author
------
</p>\r
</dd>\r
<dt>\r
---max-count=<n>\r
+-<n>\r
</dt>\r
<dd>\r
<p>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 31-Dec-2006 01:19:04 UTC\r
+Last updated 15-Jan-2007 06:12:31 UTC\r
</div>\r
</div>\r
</body>\r
include::pretty-formats.txt[]
---max-count=<n>::
+-<n>::
Limits the number of commits to show.
<since>..<until>::
<dd>\r
<p>\r
Bundle local branch <tt>fixes</tt> and <tt>enhancements</tt> on top of\r
- the current branch, making an Octopus merge.\r
+ the current branch, making an Octopus merge. This <tt>git pull .</tt>\r
+ syntax is equivalent to <tt>git merge</tt>.\r
</p>\r
</dd>\r
<dt>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 02-Jan-2007 00:04:08 UTC\r
+Last updated 15-Jan-2007 06:12:31 UTC\r
</div>\r
</div>\r
</body>\r
git pull . fixes enhancements::
Bundle local branch `fixes` and `enhancements` on top of
- the current branch, making an Octopus merge.
+ the current branch, making an Octopus merge. This `git pull .`
+ syntax is equivalent to `git merge`.
git pull -s ours . obsolete::
Merge local branch `obsolete` into the current branch,
</p>\r
</dd>\r
<dt>\r
+merge.verbosity\r
+</dt>\r
+<dd>\r
+<p>\r
+ Controls the amount of output shown by the recursive merge\r
+ strategy. Level 0 outputs nothing except a final error\r
+ message if conflicts were detected. Level 1 outputs only\r
+ conflicts, 2 outputs conflicts and file changes. Level 5 and\r
+ above outputs debugging information. The default is level 2.\r
+</p>\r
+</dd>\r
+<dt>\r
pack.window\r
</dt>\r
<dd>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 13-Jan-2007 08:09:02 UTC\r
+Last updated 15-Jan-2007 06:12:32 UTC\r
</div>\r
</div>\r
</body>\r
<div class="listingblock">\r
<div class="content">\r
<pre><tt> $ git checkout topic\r
- $ git pull . master\r
+ $ git merge master\r
\r
o---*---o---+ topic\r
/ /\r
<div class="listingblock">\r
<div class="content">\r
<pre><tt> $ git checkout topic\r
- $ git pull . master\r
+ $ git merge master\r
$ ... work on both topic and master branches\r
$ git checkout master\r
- $ git pull . topic\r
+ $ git merge topic\r
\r
o---*---o---+---o---o topic\r
/ / \\r
<div class="listingblock">\r
<div class="content">\r
<pre><tt> $ git checkout topic\r
- $ git pull . master\r
+ $ git merge master\r
$ git reset --hard HEAD^ ;# rewind the test merge\r
$ ... work on both topic and master branches\r
$ git checkout master\r
- $ git pull . topic\r
+ $ git merge topic\r
\r
o---*---o-------o---o topic\r
/ \\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 27-Dec-2006 10:59:44 UTC\r
+Last updated 15-Jan-2007 06:12:33 UTC\r
</div>\r
</div>\r
</body>\r
------------
$ git checkout topic
- $ git pull . master
+ $ git merge master
o---*---o---+ topic
/ /
------------
$ git checkout topic
- $ git pull . master
+ $ git merge master
$ ... work on both topic and master branches
$ git checkout master
- $ git pull . topic
+ $ git merge topic
o---*---o---+---o---o topic
/ / \
------------
$ git checkout topic
- $ git pull . master
+ $ git merge master
$ git reset --hard HEAD^ ;# rewind the test merge
$ ... work on both topic and master branches
$ git checkout master
- $ git pull . topic
+ $ git merge topic
o---*---o-------o---o topic
/ \
<div class="listingblock">\r
<div class="content">\r
<pre><tt>$ git pull <b>(1)</b>\r
-Trying really trivial in-index merge...\r
-fatal: Merge requires file-level merging\r
-Nope.\r
-...\r
Auto-merging nitfol\r
CONFLICT (content): Merge conflict in nitfol\r
Automatic merge failed/prevented; fix up by hand\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 26-Dec-2006 09:11:35 UTC\r
+Last updated 15-Jan-2007 06:12:34 UTC\r
</div>\r
</div>\r
</body>\r
+
------------
$ git pull <1>
-Trying really trivial in-index merge...
-fatal: Merge requires file-level merging
-Nope.
-...
Auto-merging nitfol
CONFLICT (content): Merge conflict in nitfol
Automatic merge failed/prevented; fix up by hand
<div class="content">\r
<pre><tt>$ man git-diff</tt></pre>\r
</div></div>\r
-<p>It is a good idea to introduce yourself to git before doing any\r
-operation. The easiest way to do so is:</p>\r
+<p>It is a good idea to introduce yourself to git with your name and\r
+public email address before doing any operation. The easiest\r
+way to do so is:</p>\r
<div class="listingblock">\r
<div class="content">\r
-<pre><tt>$ cat >~/.gitconfig <<\EOF\r
-[user]\r
- name = Your Name Comes Here\r
- email = you@yourdomain.example.com\r
-EOF</tt></pre>\r
+<pre><tt>$ git repo-config --global user.name "Your Name Comes Here"\r
+$ git repo-config --global user.email you@yourdomain.example.com</tt></pre>\r
</div></div>\r
</div>\r
</div>\r
made in each. To merge the changes made in experimental into master, run</p>\r
<div class="listingblock">\r
<div class="content">\r
-<pre><tt>$ git pull . experimental</tt></pre>\r
+<pre><tt>$ git merge experimental</tt></pre>\r
</div></div>\r
<p>If the changes don't conflict, you're done. If there are conflicts,\r
markers will be left in the problematic files showing the conflict;</p>\r
<p>shows a list of all the changes that Bob made since he branched from\r
Alice's master branch.</p>\r
<p>After examining those changes, and possibly fixing things, Alice\r
-could pull the changes into her master branch:</p>\r
+could merge the changes into her master branch:</p>\r
<div class="listingblock">\r
<div class="content">\r
<pre><tt>$ git checkout master\r
-$ git pull . bob-incoming</tt></pre>\r
+$ git merge bob-incoming</tt></pre>\r
</div></div>\r
-<p>The last command is a pull from the "bob-incoming" branch in Alice's\r
+<p>The last command is a merge from the "bob-incoming" branch in Alice's\r
own repository.</p>\r
<p>Alice could also perform both steps at once with:</p>\r
<div class="listingblock">\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 08-Jan-2007 06:53:23 UTC\r
+Last updated 15-Jan-2007 06:12:34 UTC\r
</div>\r
</div>\r
</body>\r
$ man git-diff
------------------------------------------------
-It is a good idea to introduce yourself to git before doing any
-operation. The easiest way to do so is:
+It is a good idea to introduce yourself to git with your name and
+public email address before doing any operation. The easiest
+way to do so is:
------------------------------------------------
-$ cat >~/.gitconfig <<\EOF
-[user]
- name = Your Name Comes Here
- email = you@yourdomain.example.com
-EOF
+$ git repo-config --global user.name "Your Name Comes Here"
+$ git repo-config --global user.email you@yourdomain.example.com
------------------------------------------------
made in each. To merge the changes made in experimental into master, run
------------------------------------------------
-$ git pull . experimental
+$ git merge experimental
------------------------------------------------
If the changes don't conflict, you're done. If there are conflicts,
Alice's master branch.
After examining those changes, and possibly fixing things, Alice
-could pull the changes into her master branch:
+could merge the changes into her master branch:
-------------------------------------
$ git checkout master
-$ git pull . bob-incoming
+$ git merge bob-incoming
-------------------------------------
-The last command is a pull from the "bob-incoming" branch in Alice's
+The last command is a merge from the "bob-incoming" branch in Alice's
own repository.
Alice could also perform both steps at once with: