git-build-hook icon indicating copy to clipboard operation
git-build-hook copied to clipboard

gitconfig add vs set

Open delanym opened this issue 2 years ago • 1 comments

I was testing out a way to use git notes to maintain a changelog (https://dev.to/leehambley/effortlessly-maintain-a-high-quality-change-log-with-git-notes-4bm5)

So I used the plugin to set

<remote.origin.fetch>+refs/notes/changelog:refs/notes/changelog</remote.origin.fetch>

But this overwrote the default

remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*

So I need an implementation of

git config [<file-option>] [--type=<type>] --add name value

Instead of

git config [<file-option>] [--type=<type>] [--fixed-value] [--show-origin] [--show-scope] [-z|--null] name [value [value-pattern]]

Maybe it could be done like this:

<remote.origin.fetch add="">+refs/notes/changelog:refs/notes/changelog</remote.origin.fetch>

delanym avatar Sep 13 '21 08:09 delanym

Hi there, thank you for the suggestion. This definitely sounds like it needs to go in.

rudikershaw avatar Sep 15 '21 20:09 rudikershaw