I’ve updated my .gitignore file to look like so:
It appears that the uploads folder has made it’s way to the repo but for whatever reason it doesn’t deploy these images to staging.
Is there a reason why the uploads folder is added to the .gitignore file by default? Wouldn’t everyone want there images to deploy to stage? At least initially?
Any feedback on how I can get these uploads to stage would be appreciated.
They are ignored because they are uploads. Not images that are part of your theme for example. Those are obviously fine to be included in the repo. Anything user generated should probably not be included.
.gitignore so you can do whatever you want of course. If you want to include all those as part of your repo, then I’d suggest simplifying your
.gitignore to just remove the initial ignores. You are basically saying “ignore these folders” and then “don’t ignore them”. Just remove them altogether.
But I have no idea why they wouldn’t be getting deployed if they are part of the repo. You can always delete the
/srv/www/<sitename>/repo just in case to force a new
git clone on the deploy.
If you’re doing a Trellis deploy then the uploads folder is probably being overwritten by the creation of the symlink to the shared uploads folder. You’ll probably want to remove that from the deploy if the uploads folder is part of the repo.