Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot add SQL file to Git repository?

I need to add a SQL file to my Git repository. For some reason Tower or Git on the command line does not see that I've added a new file whenever it ends in .sql.

I've tried creating an empty .sql and removed everything in .gitignore, but it still doesn't see it.

Any ideas?

like image 691
Zoolander Avatar asked Oct 12 '12 16:10

Zoolander


People also ask

Why does Git think my .SQL file is a binary file?

"Why is Git marking my file as binary?" The answer is because it's seeing a NUL (0) byte somewhere within the first 8000 characters of the file.

How do I add files to an existing Git repository?

To add and commit files to a Git repository Create your new files or edit existing files in your local project directory. Enter git add --all at the command line prompt in your local project directory to add the files or changes to the repository. Enter git status to see the changes to be committed.

Is SQL a binary file?

sql file is a binary file.


1 Answers

You probably have a global gitignore set up. This page on GitHub https://help.github.com/articles/ignoring-files recommends that SQL files are included in a global git ignore.

Follow instruction on that page to set your own global rules.

like image 133
Robbie Avatar answered Oct 08 '22 22:10

Robbie