3 ms·
I use -m often, it's pretty much my default commit method. It doesn't break the flow, I can see the previous commands in the terminal above which is sometimes u
by simias 6y ago
I use -m often, it's pretty much my default commit method. It doesn't break the flow, I can see the previous commands in the terminal above which is sometimes useful.
Besides it's trivial to change the commit in an editor if you're not happy with it with a simple "git commit --amend". It's even possible to change your mind in the middle of the commit command by adding '-e' as somebody else helpfully pointed out in this comment section.
I mean, I don't think my way is superior to yours, but I don't think it's inferior either. It's just a matter of taste and workflow I suppose. In particular I don't really see why editing text in vim is going to make you more or less likely to realize that you forgot to "tweak something or stage a change". And at any rate as long as you haven't pushed anything it's trivial to rewrite the commit.
- ghayes 6y agoI think the biggest difference is once I switched away from `-m`, I tend to write multi-line commit messages. Specifically, I do a title line and a full description in the commit message itself. GitHub will pick this up (if you have a single FF commit) and automatically populate a pull request description with your commit's title and message. As a side-effect, you have a detailed history available for all code patches.