* default commit message for a tree
@ 2008-04-26 1:39 Steve French
2008-04-26 2:01 ` Linus Torvalds
0 siblings, 1 reply; 3+ messages in thread
From: Steve French @ 2008-04-26 1:39 UTC (permalink / raw)
To: git
What needs to be done to setup a default commit message in git?
I did the following, trying to setup a default commit message (to get
the equivalent of what I used to have with cg-commit in the past
where 1/2 of my commit text was filled in automatically from a file in
my tree ie default signed off line etc...
What I tried: First I did
git-config commit.template commit-template
which changed the .git/config to add new "[commit]" section (see below:
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
[commit]
template = commit-template
I created a file .git/commit-template with default text as follows:
[CIFS]
Signed-off-by: Steve French <sfrench@us.ibm.com>
Now doing a "git commiit -a" though does not show this text. It just
shows the typical
empty default message in vi e.g.
# Please enter the commit message for your changes.
# (Comment lines starting with '#' will not be included)
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: fs/cifs/CHANGES
....
--
Thanks,
Steve
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: default commit message for a tree
2008-04-26 1:39 default commit message for a tree Steve French
@ 2008-04-26 2:01 ` Linus Torvalds
2008-04-26 2:13 ` Steve French
0 siblings, 1 reply; 3+ messages in thread
From: Linus Torvalds @ 2008-04-26 2:01 UTC (permalink / raw)
To: Steve French; +Cc: git
On Fri, 25 Apr 2008, Steve French wrote:
>
> I created a file .git/commit-template with default text as follows:
>
> [CIFS]
>
> Signed-off-by: Steve French <sfrench@us.ibm.com>
You need to use
git-config commit.template .git/commit-template
(or use the whole absolute pathname to your template file). The pathname
is relative to the working tree, not GIT_DIR.
Linus
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: default commit message for a tree
2008-04-26 2:01 ` Linus Torvalds
@ 2008-04-26 2:13 ` Steve French
0 siblings, 0 replies; 3+ messages in thread
From: Steve French @ 2008-04-26 2:13 UTC (permalink / raw)
To: Linus Torvalds; +Cc: git
Worked beautifully - thanks
On Fri, Apr 25, 2008 at 9:01 PM, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
>
> On Fri, 25 Apr 2008, Steve French wrote:
> >
> > I created a file .git/commit-template with default text as follows:
> >
> > [CIFS]
> >
> > Signed-off-by: Steve French <sfrench@us.ibm.com>
>
> You need to use
>
> git-config commit.template .git/commit-template
>
> (or use the whole absolute pathname to your template file). The pathname
> is relative to the working tree, not GIT_DIR.
>
> Linus
>
--
Thanks,
Steve
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-04-26 2:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-26 1:39 default commit message for a tree Steve French
2008-04-26 2:01 ` Linus Torvalds
2008-04-26 2:13 ` Steve French
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).