newren / git-filter-repo

Quickly rewrite git repository history (filter-branch replacement)
Other
8.52k stars 708 forks source link

BitBucket displays graph differntly then eclipse and git after combining repos (squashed history with previous history) #476

Closed SVNKoch closed 1 year ago

SVNKoch commented 1 year ago

I successfully merged my 2 repos, but bitbucket shows the graph wrong.

Here is what I did:

My team decided to "remove one component of the repo and for it not to eat up space, to squash the complete hisotry... I'm about to restore it now. The graph looked like this before:

squashed      NEW
A - B     C - D - E
            \  ...  \
              F - G - H

Afterwards it should look like this

A - B - D - E    
      \  ...  \  
        F - G - H

I used git filter-repo --path "folder" --invert-paths --replace-refs delete-no-add --force to clear the folder from the unsquashed history. I then add the new repo as remote and ran git rebase --rebase-merges r00t master --onto "$remote_name/master" which results in the correct graph.

The Problem

in git and eclipse the graph looks fine grafik grafik

but in BitBucket it shows up like this: grafik those outer 5 lines continue to the very first commit in the repo grafik

Any idea what could be causeing this?

SVNKoch commented 1 year ago

Was able to fix it by using parameter --committer-date-is-author-date on the git rebase --rebase-merges command