Sometimes history rewrites are required in order to migrate repositories into github.com. Several factors can dictate the need to rewrite history of a repository:
- objects larger than 100Mb
- commits larger than the 2GB push limit
Although rewriting history might not be required for your repository to migrate to github.com, you may consider rewriting history for several reasons:
- migrate large objects to LFS
- cleanup previous mistakes or bad practices that caused repo bloat
- remove secrets from repo history