Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When push to production, it says modified: mix.lock #21

Open
loongmxbt opened this issue Nov 23, 2016 · 5 comments
Open

When push to production, it says modified: mix.lock #21

loongmxbt opened this issue Nov 23, 2016 · 5 comments
Labels

Comments

@loongmxbt
Copy link

When I push to production master, always need to git checkout -- mix.lock

local: Working directory has unstaged changes.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

	modified:   mix.lock

Should I add mix.lock into .gitignore?
How does the .lock file change after deploy? (I assume the dev and prod .lock should be same?)
Am I missing something, Thanks!

@loongmxbt
Copy link
Author

loongmxbt commented Nov 24, 2016

Seems in my local dev, not mix phoenix.server to update mix.lock at first time.

Tried again, seems mix.lock changes.

@loongmxbt loongmxbt reopened this Nov 24, 2016
@mrmicahcooper
Copy link
Collaborator

Hey @loongmxbt, It could be possible for your mix.lock file to change. Your mix file has some dependencies that are specific to dev?

That being said. This shouldn't make too big of a difference when deploying. When you git push to your production server, that push should overwrite any changes that may have been created by the previous deploy.

@hut8
Copy link

hut8 commented Jan 30, 2017

Just a thought: Are you using the same version of Elixir and Hex between dev and production? Mine randomly changed the order of some dependencies when I upgraded one of those.

@josephan
Copy link

@hut8 I knew I had the same Elixir version but I forgot about Hex. Thanks! I just run mix local.hex

@praisegeek
Copy link

Simply do git update-index --assume-unchanged mix.lock to prevent it from being tracked by git.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants