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

[PATCH v4 7/7] pull: add documentation about non-ff merges

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Oct 12, 2013, 07:02 UTC
Message-ID
<1381561322-20059-8-git-send-email-felipe.contreras@gmail.com>
In-Reply-To
<1381561322-20059-1-git-send-email-felipe.contreras@gmail.com>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 Documentation/git-pull.txt | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt
index 6d55737..b4053a8 100644
--- a/Documentation/git-pull.txt
+++ b/Documentation/git-pull.txt
@@ -23,6 +23,7 @@ More precisely, 'git pull' runs 'git fetch' with the given
 parameters and calls 'git merge' to merge the retrieved branch
 heads into the current branch.
 With `--rebase`, it runs 'git rebase' instead of 'git merge'.
+With `--merge`, it forces the merge, even if it's non-fast forward.
 
 <repository> should be the name of a remote repository as
 passed to linkgit:git-fetch[1].  <refspec> can name an
@@ -41,9 +42,26 @@ Assume the following history exists and the current branch is
 ------------
 	  A---B---C origin/master
 	 /
+    D---E master
+------------
+
+Then `git pull` will merge in a fast-foward way up to the new master.
+
+------------
+    D---E---A---B---C master, origin/master
+------------
+
+However, a non-fast-foward case looks very different.
+
+------------
+	  A---B---C origin/master
+	 /
     D---E---F---G master
 ------------
 
+In the future, `git pull` will fail on these situations, however, most likely
+you would want to force a merge, which you can do with `git pull --merge`.
+
 Then "`git pull`" will fetch and replay the changes from the remote
 `master` branch since it diverged from the local `master` (i.e., `E`)
 until its current commit (`C`) on top of `master` and record the
-- 
1.8.4-fc
Previous: Felipe Contreras
Message 8 of 8 in “pull: add merge-ff-only option”
  1. 4/7 pull: add merge-ff-only optionFelipe Contreras, Oct 12, 2013
  2. 0/7 Reject non-ff pulls by defaultFelipe Contreras, Oct 12, 2013
  3. 3/7 pull: add --merge optionFelipe Contreras, Oct 12, 2013
  4. 5/7 pull: add warning on non-ff mergesFelipe Contreras, Oct 12, 2013
  5. 6/7 pull: cleanup documentationFelipe Contreras, Oct 12, 2013
  6. 2/7 pull: refactor $rebase variable into $modeFelipe Contreras, Oct 12, 2013
  7. 1/7 pull: rename pull.rename to pull.modeFelipe Contreras, Oct 12, 2013
  8. 7/7 pull: add documentation about non-ff mergesFelipe Contreras, Oct 12, 2013

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.