diff options
author | 2023-09-13 05:51:07 +0100 | |
---|---|---|
committer | 2023-09-12 21:51:07 -0700 | |
commit | 534fd30dbd297d69b8680df66019d865fdf54e39 (patch) | |
tree | 01fa6604a723b20b1bb61f407b4191836e6641a9 | |
parent | 3b2c0941e4b418dcf2bfbc5117da76338f45a90e (diff) | |
download | bun-534fd30dbd297d69b8680df66019d865fdf54e39.tar.gz bun-534fd30dbd297d69b8680df66019d865fdf54e39.tar.zst bun-534fd30dbd297d69b8680df66019d865fdf54e39.zip |
Use git's --global flag for lockfile diffs instead of manually modifying config files (#5143)
-rw-r--r-- | docs/install/lockfile.md | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/docs/install/lockfile.md b/docs/install/lockfile.md index 599403913..cf1dc3794 100644 --- a/docs/install/lockfile.md +++ b/docs/install/lockfile.md @@ -12,28 +12,18 @@ Run `bun install -y` to generate a Yarn-compatible `yarn.lock` (v1) that can be To add to the global gitattributes file: -- First try `$XDG_CONFIG_HOME/git/attributes` -- If `$XDG_CONFIG_HOME` is not set, try `~/.config/git/attributes` +To enable diffing in the local gitattributes file (per-repository): -For example, on macOS, add the following to `~/.config/git/attributes`: - -``` -*.lockb diff=lockb -``` - -Then add the following to `~/.gitconfig`: - -``` -[diff "lockb"] - textconv = bun - binary = true +```sh +$ git config diff.lockb.textconv bun +$ git config diff.lockb.binary true ``` -To only add to the local gitattributes file: +To enable diffing in the global gitattributes file (system-wide), use the `--global` option: ```sh -$ git config diff.lockb.textconv bun -$ git config diff.lockb.binary true +$ git config --global diff.lockb.textconv bun +$ git config --global diff.lockb.binary true ``` **Why this works:** |