On Wed, Aug 17, 2011 at 5:17 PM, Andrew Dunstan <andrew@dunslane.net> wrote:
> It's not a script. "git commit -F filename" is the culprit. It seems if you
> intend to reuse the message file that git carefully saves for you, you need
> to trim the comment lines. What I did was in the master branch, "git commit
> -a" and then in the 9.1 branch "git commit -a -F
> /path/to/master/.git/COMMIT_EDITMSG" to reuse the commit message, not
> realizing it would not trim the comment lines if I use -F, unlike when it
> puts me into the editor.
Another way to do it is, if you're back-patching to another branch
after commiting on master, you can do:
git commit -c master
Which throws you into the editor, but loads the commit message,
author, and timestamp from the latest commit on that branch. Or you
can use any other way of referring to a commit - e.g. master~1, SHA,
etc.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company