git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Note that '.' is a useful value for <repository> in git-pull.

From
Daniel Barkalow <barkalow@iabervon.org>
Date
Nov 1, 2005, 03:28 UTC
Message-ID
<Pine.LNX.4.64.0510312220230.25300@iabervon.org>

Mention in the tutorial and in the documentation for git-pull that you can merge local branches with all the bells and whistles with "git pull . <branch>"

Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
---

"git pull . <branch>" does, in fact, do exactly what I wanted, and, when the tutorial mentioned that you could do this, it didn't mention why you might want to.

 Documentation/git-pull.txt |    3 ++-
 Documentation/tutorial.txt |   12 ++++++++++--
 2 files changed, 12 insertions(+), 3 deletions(-)

applies-to: 8c8ace55eb085e930dcc9482f7cf66f9399374b4 0ba51e8c8298aff4256bd63289071f23b4d83db3

diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt
index bae05de..fe0c18a 100644
--- a/Documentation/git-pull.txt
+++ b/Documentation/git-pull.txt
@@ -13,7 +13,8 @@ SYNOPSIS
 
 DESCRIPTION
 -----------
-Runs 'git-fetch' with the given parameters.
+Runs 'git-fetch' with the given parameters. This is effectively
+skipped if the repository is '.'
 
 When only one ref is downloaded, runs 'git resolve' to merge it
 into the local HEAD.  Otherwise uses 'git octopus' to merge them
diff --git a/Documentation/tutorial.txt b/Documentation/tutorial.txt
index b9f737e..78443a9 100644
--- a/Documentation/tutorial.txt
+++ b/Documentation/tutorial.txt
@@ -1027,8 +1027,16 @@ course, you will pay the price of more d
 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`.
+
+One useful special case is
+
+	git pull . <branch-name>
+
+which does about the same thing as the `git resolve` calls for merging
+local branches, except that you don't have to type in the message or
+the side you're merging into (which is the branch that you have
+checked out).
+
 
 It is likely that you will be pulling from the same remote
 repository from time to time. As a short hand, you can store
---
0.99.8.GIT
Message 1 of 1 in “Note that '.' is a useful value for <repository> in git-pull.”
  1. Note that '.' is a useful value for <repository> in git-pull.Daniel Barkalow, Nov 1, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.