I have many large binary files with source code under git version control.
I want to only push the source files to github for repo initialization.
So I used git rm -r --cached
to remove the large binary files from the index.
After checking git ls-tree -r --names-only mybranch
, I confirmed there are only text source files in the index.
When I then pushed to github, git
checked 3 thousand files to transfer, and started pushing about 1GB content to remote github. But those source files together occupy merely 53KB.
From the logs I found that the binary files in historic commits were being pushed to remote.
Is there an option that only pushes my current index? like :
git push --depth 1
Thanks in advance for any advice.