0

I have a git repository with ~6000 commits and 40 branches, which is a fork of previous repository with ~5000 commits. Is it possible to squash all 5000 commits that came from original repo to a single "initial" commit, and rewrite the history of the new repository on top of it for all branches?

  • 2
    Yes! That is possible. – mkrieger1 Nov 16 '21 at 16:03
  • 1
    Does this answer your question? [How to squash all git commits into one?](https://stackoverflow.com/questions/1657017/how-to-squash-all-git-commits-into-one) – Brian Thompson Nov 16 '21 at 16:04
  • Thanks Brian, but using rebase this way or an orphan branch are actions on a given branch, and brake my other branches. I need to keep the recent history of all branches intact – VladKeel Nov 17 '21 at 07:41

0 Answers0