I have many large files under project/public/deploy/. All the rest is my source codes. When i pushed yesterday, still today its not complete yet, and my network is dead slow for this. I understand its because i have largest files and getting pushed, which is like impossible.
How can i tell git push do not ever push the directory, project/public/deploy/?
project/
./application/<all source codes>
./framework/<all source codes>
./public/deploy/download/archlinux.fedora.centos.freebsd.isos.tar.gz
./public/deploy/tutorial/oracle.bigtable.mysql.db2.why.mp4
./public/deploy/tutorial/c.cpp.java.d.vala.tutorial.episode1.mp4
./public/deploy/tutorial/c.cpp.java.d.vala.tutorial.episode2.mp4
./public/deploy/tutorial/c.cpp.java.d.vala.tutorial.episode3.mp4
./public/deploy/tutorial/hacking.android.linux.mp4
Is there any way to put a push flag or put a tiny gitignore file in a direcotry where it can ignore everything? (before trakking and after tracking, when-ever there is a ignore suggestion it will always/forever ignore that directory unless i remove it?)
Large binary files should not live inside your project. Git is not the right tool for that job as you have noticed. The files should be ignored in your project’s
.gitignore. Add a line likepublic/deploy/tutorial/*.mp4(or less specific if you want).Now, as the files are already in your repository, you need to amend the history of your repository. Github has a tutorial on this subject, which boils down to:
Now that the repository has been cleaned, you can push it. It should complete as fast as usually.