0

I'm going to fork and work on a project called tweakCompatible soon. However, because of the way it works, the git commit history is really long and there are more than 84000 closed issues (4 zeroes) and commits "fixing" them. You can find the repository here: tweakCompatible on Github

How can I strip those commits, issues and their changes from the repository?

2 Answers2

0

Use a Shallow clone of the repository:

git clone --depth 1 <repo_url>

This will only clone the HEAD commit from the remote.

Esteban Garcia
  • 2,171
  • 16
  • 24
0
git filter-branch --commit-filter '
    if [ `git rev-list --all --grep "<log-pattern>" | grep -c "$GIT_COMMIT"` -gt 0 ]
    then
        skip_commit "$@";
    else
        git commit-tree "$@";
    fi'  HEAD

Source

EncryptedWatermelon
  • 4,788
  • 1
  • 12
  • 28