git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Steve French" <smfrench@gmail.com>
To: git@vger.kernel.org
Subject: default commit message for a tree
Date: Fri, 25 Apr 2008 20:39:20 -0500	[thread overview]
Message-ID: <524f69650804251839u56198808o8b7a66d9894fbbfc@mail.gmail.com> (raw)

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

             reply	other threads:[~2008-04-26  1:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-26  1:39 Steve French [this message]
2008-04-26  2:01 ` default commit message for a tree Linus Torvalds
2008-04-26  2:13   ` Steve French

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=524f69650804251839u56198808o8b7a66d9894fbbfc@mail.gmail.com \
    --to=smfrench@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).