2

I added app.apk into git repository first, and then we decided to remove app.apk from git repository. Not only remove it from source code directory but also .git directory to reduce the size of git repository.

Suppose I have a commit log like this:

commit07 remove `app.apk` from source code directory commit06 update some files commit06 update `app.apk` and some files commit05 fix some bug in source code files commit04 update `app.apk` and some other source code files commit03 update some source code files commit02 add `app.apk` and some other source code files commit01 init 

but the size does not shrink. I want to remove app.apk from history too.

Which means if I checkout commit04 and ls app.apk will say app.apk not found

the commit hash is OK to be changed.

Is it possible to do that?

1
  • 1
    Check this GitHub post on deleting sensitive data from git. This will effectively remove the file from history. I used the filter branch method and worked like a charm. Commented Mar 1, 2017 at 1:30

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.