Skip to content

Instantly share code, notes, and snippets.

@jirikuncar
Last active October 10, 2022 09:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jirikuncar/dc2e0d8bc01708e303610a87cbe73dc7 to your computer and use it in GitHub Desktop.
Save jirikuncar/dc2e0d8bc01708e303610a87cbe73dc7 to your computer and use it in GitHub Desktop.
Git merge driver for `poetry.lock`
# or $GIT_DIR/info/attributes or $XDG_CONFIG_HOME/git/attributes or $HOME/.config/git/attributes
poetry.lock merge=poetry-lock
[merge "poetry-lock"]
name = "Run poetry lock"
driver = poetry lock && cp %P %A

Git merge driver for poetry.lock

  1. Configure new driver call poetry-lock either globaly in ~/.gitconfig or in $GIT_DIR/config.
  2. Tell Git to use this driver when merging poetry.lock file by commiting .gitattributes in your repository or by editing $GIT_DIR/info/attributes or setting it globally for all repositories in $HOME/.config/git/attributes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment