Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support commit.template #546

Closed
extrawurst opened this issue Feb 24, 2021 · 0 comments · Fixed by #671
Closed

support commit.template #546

extrawurst opened this issue Feb 24, 2021 · 0 comments · Fixed by #671
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@extrawurst
Copy link
Collaborator

based off of #517

git commit uses a default template for commit messages that the commit.template config allows the user to overwrite:
https://www.git-scm.com/book/en/v2/Customizing-Git-Git-Configuration

it should be fairly easy to use that config in gitui and pre-populate a commit msg text

@extrawurst extrawurst added enhancement New feature or request good first issue Good for newcomers labels Feb 24, 2021
wandernauta added a commit to wandernauta/gitui that referenced this issue Apr 25, 2021
If a commit message template is set with...

    git config commit.template /path/to/some/file.txt

...this fills the commit message box (and therefore, later, the external
editor) with the contents of that file, as long as you don't have something
more interesting typed there already.

Like the `git commit` command, this doesn't let you create a commit that has
just the template as its message, unchanged.  Unlike the `git commit` command,
not being able to read the template file is not fatal: specifically, if the
commit.template setting is pointed at a file that does not exist, this does
nothing.

Resolves gitui-org#546.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant