threads / patch / 20240

patchsubtree merge strategy fails if branch.master.rebase=true

Subject: [PATCH] subtree merge strategy fails if branch.master.rebase=true

## tl;dr

One message between Jul 26, 2009 and Jul 26, 2009. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Jason Holden· Jul 26, 2009, 21:47 UTC · lore

Update documentation so that users pass --no-rebase to the git-pull command when using the subtree merge strategy. Without it, if a user has specified in their config file that branch.master.rebase=true, the pull will fail with the following error:

>From /disk2/git_projects/git/Bproject
 * branch            master     -> FETCH_HEAD
First, rewinding head to replay your work on top of it...
fatal: Could not parse object 'c54bafddcae4679e8a675713251ace678f962aa0^'
Unknown exit code (128) from command: git-merge-subtree c54bafddcae4679e8a675713251ace678f962aa0^ -- HEAD c54bafddcae4679e8a675713251ace678f962aa0
The hash value referenced above is the first commit made to the main
repository (not the Bproject subtree).
---
 Documentation/howto/using-merge-subtree.txt |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Show changes to Documentation/howto/using-merge-subtree.txt +1 −1
diff --git a/Documentation/howto/using-merge-subtree.txt b/Documentation/howto/using-merge-subtree.txt
index 0953a50..3f5972e 100644
--- a/Documentation/howto/using-merge-subtree.txt
+++ b/Documentation/howto/using-merge-subtree.txt
@@ -37,7 +37,7 @@ $ git merge -s ours --no-commit Bproject/master <2>
 $ git read-tree --prefix=dir-B/ -u Bproject/master <3>
 $ git commit -m "Merge B project as our subdirectory" <4>
 
-$ git pull -s subtree Bproject master <5>
+$ git pull --no-rebase -s subtree Bproject master <5>
 ----------------
 <1> name the other project "Bproject", and fetch.
 <2> prepare for the later step to record the result as a merge.
-- 
1.6.3.3.497.g2e2f

← back to recent threads