It helps if you actuall remove the .lock file as well as adding it to .gitignore.