{"thread":{"id":"13264","subject":"default commit message for a tree","startedAt":"2008-04-26T01:39:20Z","lastAt":"2008-04-26T02:13:21Z","messageCount":3,"participants":["Steve French","Linus Torvalds"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"75207","messageId":"524f69650804251839u56198808o8b7a66d9894fbbfc@mail.gmail.com","threadId":"13264","inReplyTo":null,"subject":"default commit message for a tree","fromName":"Steve French","fromEmail":"smfrench@gmail.com","sentAt":"2008-04-26T01:39:20Z","receivedAt":"2008-04-26T01:39:20Z","isPatch":false,"sender":{"key":"smfrench@gmail.com","avatar":"https://gravatar.com/avatar/abd38036fa7e26214d332fcd6240ad1cf8cd68b831b674e329b0b9071d5a1fb2?d=mp&s=160"},"body":"What needs to be done to setup a default commit message in git?\n\nI did the following, trying to setup a default commit message (to get\nthe equivalent of  what I used to have with cg-commit in the past\nwhere 1/2 of my commit text was filled in automatically from a file in\nmy tree ie default signed off line etc...\n\nWhat I tried: First I did\n    git-config commit.template commit-template\n\nwhich changed the .git/config to add  new \"[commit]\" section (see below:\n[core]\n        repositoryformatversion = 0\n        filemode = true\n        bare = false\n        logallrefupdates = true\n[remote \"origin\"]\n        url = git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6.git\n        fetch = +refs/heads/*:refs/remotes/origin/*\n[branch \"master\"]\n        remote = origin\n        merge = refs/heads/master\n\n[commit]\n        template = commit-template\n\n\n\n\nI created a file .git/commit-template with default text as follows:\n\n[CIFS]\n\nSigned-off-by: Steve French <sfrench@us.ibm.com>\n\n\n\n\nNow doing a \"git commiit -a\" though does not show this text.  It just\nshows the typical\nempty default message in vi e.g.\n\n\n# Please enter the commit message for your changes.\n# (Comment lines starting with '#' will not be included)\n# On branch master\n# Changes to be committed:\n#   (use \"git reset HEAD <file>...\" to unstage)\n#\n#       modified:   fs/cifs/CHANGES\n....\n\n-- \nThanks,\n\nSteve\n"},{"id":"75208","messageId":"alpine.LFD.1.10.0804251859100.2813@woody.linux-foundation.org","threadId":"13264","inReplyTo":"524f69650804251839u56198808o8b7a66d9894fbbfc@mail.gmail.com","subject":"Re: default commit message for a tree","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2008-04-26T02:01:26Z","receivedAt":"2008-04-26T02:01:26Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Fri, 25 Apr 2008, Steve French wrote:\n> \n> I created a file .git/commit-template with default text as follows:\n> \n> [CIFS]\n> \n> Signed-off-by: Steve French <sfrench@us.ibm.com>\n\nYou need to use\n\n\t    git-config commit.template .git/commit-template\n\n(or use the whole absolute pathname to your template file). The pathname \nis relative to the working tree, not GIT_DIR.\n\n\t\tLinus\n"},{"id":"75209","messageId":"524f69650804251913s302bf05n2853c267a0475768@mail.gmail.com","threadId":"13264","inReplyTo":"alpine.LFD.1.10.0804251859100.2813@woody.linux-foundation.org","subject":"Re: default commit message for a tree","fromName":"Steve French","fromEmail":"smfrench@gmail.com","sentAt":"2008-04-26T02:13:21Z","receivedAt":"2008-04-26T02:13:21Z","isPatch":false,"sender":{"key":"smfrench@gmail.com","avatar":"https://gravatar.com/avatar/abd38036fa7e26214d332fcd6240ad1cf8cd68b831b674e329b0b9071d5a1fb2?d=mp&s=160"},"body":"Worked beautifully - thanks\n\nOn Fri, Apr 25, 2008 at 9:01 PM, Linus Torvalds\n<torvalds@linux-foundation.org> wrote:\n>\n>\n>  On Fri, 25 Apr 2008, Steve French wrote:\n>  >\n>  > I created a file .git/commit-template with default text as follows:\n>  >\n>  > [CIFS]\n>  >\n>  > Signed-off-by: Steve French <sfrench@us.ibm.com>\n>\n>  You need to use\n>\n>             git-config commit.template .git/commit-template\n>\n>  (or use the whole absolute pathname to your template file). The pathname\n>  is relative to the working tree, not GIT_DIR.\n>\n>                 Linus\n>\n\n\n\n-- \nThanks,\n\nSteve\n"}]}