0

I have a history on my repository like so:

enter image description here

Now I want to fix those 3 commits where my partner did not correctly author it, i've done this before using this answer as a guide. So since I want to change those 3, I figured I would rebase at face866, so I run

git rebase -i face866

But something weird happens, this is the list of commits I am met with

enter image description here

fcc7a9b, 2459b01, 2f805cd all make sense, but where is 18bc0ad? And why are all the commits from 7 days ago skipped? it continues on from the commit from 11 days ago but, they all have different tags too?

Even stranger, if I open the repo up in Github's app it says my history is:

enter image description here

Which is missing commits. What is going on here? The commit list doesn't make any sense to me, and the app has the wrong history. I only have one idea as to what has happened

  • Last time I rebased I used git push --force to rewrite the history, I was not aware my partner was active and as he has push access, he pushed those commits < 6 days ago with his old history but it didn't seem to double the commits as I expected

EDIT: decorated log enter image description here

Community
  • 1
  • 1
Syntactic Fructose
  • 18,936
  • 23
  • 91
  • 177

1 Answers1

2

git rebase will linearize your commit history before your merge commit 18bc0ad. That is why it is missing. git rebase has a --preserve-merges switch that you probably know, but I advise against using it.

In your case I'd say it's best to keep the history as-is. From my experience, you would otherwise likely end up in a very painful situation. If you want to try, you can start the rebase and perhaps git rebase --abort when there are too many conflicts to resolve.

Alexander Groß
  • 10,200
  • 1
  • 30
  • 33