git commit
can take a commit message from a file using the -F
option. So, you can do something like this:
# Do some work
$ echo 'Did some work' > commit-msg.txt
# Do some more work
$ echo 'Did some more work' >> commit-msg.txt
$ git commit -F commit-msg.txt