'How do you resolve git conflicts in Pipfile and Pipfile.lock when using Pipenv with git?
I'm working on a project which is using pipenv instead of pip and virtualenv separately. I'm at a loss as to best practices in how to manage Pipfile and Pipfile.lock when there are git conflicts due to multiple developers working on the same repository.
One of the issues is that it looks like Pipfile and Pipfile.lock aren't really meant to be human readable / human editable. For example, I'm seeing conflicts where the diff is in an unreadable sha256 hash. Compare with the old style requirements.txt file, where the conflict tends to be easily human readable.
So my question is :
Is there a best practice for merging conflicting Pipfiles? Are there good tools for this purpose? Basically, what's your git workflow when you discover that the upstream Pipfile has changed out from under you, or your local Pipfile / Pipfile.lock is now out of date?
Solution 1:[1]
Ideally you create a workflow to avoid these conflicts in the first place. When you do have conflicts, you can either manually resolve them in Pipfile or delete them entirely and run pipenv install <package> for each package that needs to be added. Then delete Pipfile.lock and run pipenv install to generate it again.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Code-Apprentice |
