Question: Is there any way to ignore a directory when you push remotely? The catch is I don't want to ignore it. I still want to track the directory, and have local commits and branches for it. Say, I'm working on a project that relies on a database. This project does not have transitional schema or anything. It is populated with data for testing. I have a symbolic link for MySQL's folder/files (MyISAM MYD/MYI) to my local repository. I want the database and the commits in sync, but cannot push the database (or assets, etc). I tried a submodule, with no avail - the parent repo ignores the child submodule changes. How would I go about this? Example structure:

/repo/my-project <-- git repo  

/repo/my-project/src <-- push commits related to this section to a remote repo that uses this as the root directory

/repo/my-project/mysql <-- track these but don't push them  

/repo/my-project/mysql/db\_1/table\_1.frm  

/repo/my-project/mysql/db\_1/table\_1.MYD  

/repo/my-project/mysql/db\_1/table\_1.MYI 

Thanks!

Answer: 
It's possible to ignore files from inclusion to your repository by adding them to the .gitignore file -- but I don't think that's what you want.

Try this: <http://book.git-scm.com/4_ignoring_files.html>
Why not track the database in a separate repository without a remote branch?

(Note that if you never push remotely, you wont have a backup if your hard drive fails.)