Re: [PATCH 4/4] cherry-pick: Add `--empty` for more robust redundant commit handling
- From
- Phillip Wood <phillip.wood123@gmail.com>
- Date
- Jan 22, 2024, 10:40 UTC
- Message-ID
- <d0d6626c-7181-44ce-ae50-f9cb57381ebd@gmail.com>
- In-Reply-To
- <CAHPHrSddqTEjtfhgVJ=vmRhbtuwXcGEiE1KFZqR1QhKw-HDtSg@mail.gmail.com>
Hi Brian
On 21/01/2024 18:28, Brian Lyles wrote:
> Is the sample pre-commit hook the ideal way to prevent this in the > future? Or is there some config I could set globally to enforce this > across repositories? I was having a little trouble finding a good way to > accomplish this globally.
If you want to run the same hooks in all your repositories then you can run 'git config --global core.hooksPath <my-hooks-path>' and git will look for hooks in 'my-hooks-path' instead of '.git/hooks'. It makes it tricky to run different linters in different projects though.
I'll try and take a proper look at these patches in the next couple of days.
Best Wishes
Phillip