papertank / envoy-deploy

Laravel Envoy Deployment
MIT License
424 stars 85 forks source link

storage symlink causes git to think there's a new file #4

Closed smenzer closed 7 years ago

smenzer commented 7 years ago

I followed your instructions and have done the "init" so far. However, when I go to my server to make sure everything is setup properly and to adjust my .env file, I noticed that git thinks that the storage dir is now a new file:

$ git st
# On branch master
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#   storage
nothing added to commit but untracked files present (use "git add" to track)

Have you come across this as well? If so, is there a good solution here? If I add this "untracked file" to the repo, I'm afraid it will screw things up on my local development box.

davidrushton commented 7 years ago

Hey @smenzer

I only use this deployment script for my production server / environment, so I never use git to check status or commit on production.

Your project root folder on your server should look like:

20150317110501/
20150317114500/
current -> ./20150317114500
storage/
.env

And inside any of the date-based release folders should sit that snapshot of your Laravel app, like:

app/
artisan
boostrap/
composer.json
.env -> ../.env
storage -> ../storage
vendor/

As long as you don't plan to commit from your dev / production server inside any of the release folders, the "Untracked files" message for the storage folder can probably be ignored.