We have a problem that our repository size exceeded the allowed limit and we are now blocked to push any local commit.
So we used bfg
to remove big files and re-write the whole history of the repository then pushed it to a new one, in meanwhile multiple commits were produced by other developers.
I want to know a simple way to move the commits that we couldn't push into the new repository? as I don't want to apply each change manually.
I think I found a nice solution based on this question
I did the following:
git remote add oldRepo <oldRepoPath>/.git
git fetch oldRepo
git checkout <yourBranch>
git cherry-pick <OldestUnpushedCommitSHA>..<LatestsUnpushedCommitSHA>
git push
git remote remove oldRepo