gatling icon indicating copy to clipboard operation
gatling copied to clipboard

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

Open loongmxbt opened this issue 8 years ago • 5 comments

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 avatar Nov 23 '16 15:11 loongmxbt

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

Tried again, seems mix.lock changes.

loongmxbt avatar Nov 24 '16 05:11 loongmxbt

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.

mrmicahcooper avatar Dec 08 '16 00:12 mrmicahcooper

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.

hut8 avatar Jan 30 '17 17:01 hut8

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

josephan avatar May 23 '17 01:05 josephan

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

praisegeek avatar Jun 09 '17 19:06 praisegeek