threads / discuss / 61028

[question] How to customize git revert template

Subject: [question] How to customize git revert template

## tl;dr

3 messages between Feb 29, 2024 and Mar 4, 2024.

replies: 2people: 2as markdown or json

Wu Zhenyu· Feb 29, 2024, 12:52 UTC · lore
In https://git-scm.com/docs/git-revert
> While git creates a basic commit message automatically
How can I customize git revert template? e.g.,

```sh git config revert.template ~/.config/git/template ```

TIA!
-- 
Best Regards
Wu Zhenyu
Kristoffer Haugsbakk· Feb 29, 2024, 15:18 UTC · re: Wu Zhenyu · lore

Re: [question] How to customize git revert template

Hi
On Thu, Feb 29, 2024, at 13:52, Wu Zhenyu wrote:
Show 15 quoted lines
> In https://git-scm.com/docs/git-revert
>
>> While git creates a basic commit message automatically
>
> How can I customize git revert template? e.g.,
>
> ```sh
> git config revert.template ~/.config/git/template
> ```
>
> TIA!
>
> --
> Best Regards
> Wu Zhenyu
I see no way to customize this message. Your only choices seem to be
1. This default
2. The “reference” style using `--reference`
So there doesn’t seem to be a template alternative here.
-- 
Kristoffer Haugsbakk
Wu Zhenyu· Mar 3, 2024, 14:44 UTC · re: Kristoffer Haugsbakk · lore

Re: [question] How to customize git revert template

Can git support the feature to customize template? Is it possible?
TIA!
On Thu, Feb 29, 2024 at 04:18:20PM +0100, Kristoffer Haugsbakk wrote:
Show 30 quoted lines
> Hi
> 
> On Thu, Feb 29, 2024, at 13:52, Wu Zhenyu wrote:
> > In https://git-scm.com/docs/git-revert
> >
> >> While git creates a basic commit message automatically
> >
> > How can I customize git revert template? e.g.,
> >
> > ```sh
> > git config revert.template ~/.config/git/template
> > ```
> >
> > TIA!
> >
> > --
> > Best Regards
> > Wu Zhenyu
> 
> I see no way to customize this message. Your only choices seem to be
> 
> 1. This default
> 2. The “reference” style using `--reference`
> 
> So there doesn’t seem to be a template alternative here.
> 
> -- 
> Kristoffer Haugsbakk
> 
> 
-- 
Best Regards
Wu Zhenyu

← back to recent threads