Reputation: 35
My project has a folder called 'images', its content depends on user uploads, so the content from the development environment is different of the production one.
When a commit is merged and deployed to the host via git, it automatically deletes all the content in the production. I tried using .gitignore with images/* to ignore all the content, but the git interpreters as if the content was deleted.
Upvotes: 1
Views: 490
Reputation: 1325337
its content depends on user uploads
That is a runtime data, no a source code base element.
In your source code, you should record image as a symlink (stored in a Git repository as a blob with a path to an external folder)
That way:
image/
folder content is not impacted by the Git repository being merged or checked out.Upvotes: 3