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?

Sato
  • 8,192
  • 17
  • 60
  • 115
  • 1
    Check this GitHub [post on deleting sensitive data from git](https://help.github.com/articles/removing-sensitive-data-from-a-repository/). This will effectively remove the file from history. I used the filter branch method and worked like a charm. – alvits Mar 01 '17 at 01:30

0 Answers0