I use a couple of software packages (like gitlab) that you install by cloning from their git repo. They typically come with some config.example
(under version control), which you copy to your own config
file (not under version control or even ignored in .gitignore
) and adapt to your needs.
When the upstream package is updated and for example changes the config file options that will obviously only be reflected in config.example
.
Is there a chain of git commands that i'm missing that can help me compare the changes of config.example
to the new one in upstream/HEAD
and maybe even merge them interactively into my local config
file?
Would be awesome if i could get something like the interactive patch mode in git add/commit --interactive
.
git checkout --patch
selects diff hunks, simplest here might be to put your content at the upstream path, do that, and clean up after:
cp config config.example
git checkout -p upstream config.example
mv config.example config
git checkout @ config.example
that will get you the two-diff hunk selection from git add --patch
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With