I have a git repository with lots of pdf
and zip
files. Can git treat them as just a file name? in this case, the repo should be very small.
I have tried to add a .gitattributes
with the following lines:
*.zip binary
*.pdf binary
After I commit, the .git
directory is still very large. Is there a way to reduce the size of my repository?
Any solution is welcome. such as recreate a new repository. The commit history is not important for me.
Thanks in advance.
I use the command
git archive <branch> > file.zip
And, ... I think that your repository do not care about zip and pdf: you really need to version documents? I think the best way is to version only code. Documents should be stored in another place, like data: data are often stored in a database and database is never part of the repository.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.