I have my git automatically syncing the files in the repo to my droplet, but I have a database in there and everytime there’s a new update in the repo it also updates the database. Any ideas how to fix it? I also tried adding a .gitignore, I don’t think I did it right though.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Heya,
you are on the correct path!
Your
.gitignore
file should include the relative path to the database file. For example, if your database is nameddb.sqlite3
and located in the project root, your.gitignore
should look like this:If the database is inside a folder, include the folder in the path:
3. Verify
.gitignore
is WorkingAfter setting up
.gitignore
, test to ensure Git ignores the database file: