1

Shouldn't the -Xours force any conflicts / errors to behave like they are in the branch I'm rebasing from?

My end goal here is having the same files as the sorce branch, with their history, in my new repo

CIsForCookies
  • 12,097
  • 11
  • 59
  • 124
  • This message (`fatal: Could not parse object`) indicates some kind of syntactic error in your actual Git command. – torek Aug 04 '19 at 19:39
  • Is it the git command or the merge msg my rebase is rewinding? Cause I think there were some kind of conflicts somehow, and that my original command was ok – CIsForCookies Aug 05 '19 at 03:18
  • I can't guess what commands you ran. All I can tell you is that there was syntactic glitch somewhere. The message appears in three different Git source files: `builtin/am.c`, `builtin/reset.c`, and `merge-recursive.c`. – torek Aug 05 '19 at 05:10

1 Answers1

1

My end goal here is having the same files as the source branch, with their history, in my new repo

Then a git merge -s ours would be enough:

git checkout source -b origin/a_source_branch
git merge --ours mybranch
git checkout mybranch
git merge source

This is using the ours strategy, as opposed to -Xours, which is an option to a merge strategy.

See more at "Git command for making one branch like another".

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250