From 687e31dc3a16e76926f0eb06155c5357741b05ab Mon Sep 17 00:00:00 2001 From: "Guilherme J. Tramontina" Date: Thu, 14 Sep 2023 03:27:32 +1000 Subject: [PATCH] docs: update lockfile diff instructions (#5275) --- docs/install/lockfile.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/install/lockfile.md b/docs/install/lockfile.md index cf1dc37946..c7306c1b95 100644 --- a/docs/install/lockfile.md +++ b/docs/install/lockfile.md @@ -10,16 +10,20 @@ Run `bun install -y` to generate a Yarn-compatible `yarn.lock` (v1) that can be #### How do I `git diff` Bun's lockfile? -To add to the global gitattributes file: +Add the following to your local or global `.gitattributes` file: -To enable diffing in the local gitattributes file (per-repository): +``` +*.lockb binary diff=lockb +``` + +Then add the following to you local git config with: ```sh $ git config diff.lockb.textconv bun $ git config diff.lockb.binary true ``` -To enable diffing in the global gitattributes file (system-wide), use the `--global` option: +Or to your global git config (system-wide) with the `--global` option: ```sh $ git config --global diff.lockb.textconv bun