Technically there's nothing wrong with that, but it is a sign that you might be doing something wrong. If you make a commit, you should be spending some time thinking about what you are doing, what you want to write, and what files are affected.
Having an editor open gives you that time. Using -m on the other hand only discourages writing proper multiline messages when they are actually needed. When you already wrote a summary and notice you might want to add a few more lines, it's way easier if you already have an editor than if you just wrote the whole thing on the commandline and would have to delete it all then reproduce it in the editor.
This and what @pandademic said can be resolved by creating terminal aliases for specific commands. For example I have git adcom "msg" which is an alias for "git add ." combined with "git commit -m 'msg'"
yes(off-topic: we could also use git aliases) , that's what I do @damjand , but I just feel that it would make everyone's life a little easier not to have more aliases to remember.
The point of aliases is not just to have shortcuts but to also make commands that are so short and custom-tailored that you don't even have to remember them like you do for built-in commands :)
Some comments have been hidden by the post's author - find out more
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
It's bad enough that
-m
is an option at all; why would that ever be a default?I just feel we don't need to open
$EDITOR
every time we want to commit something.Technically there's nothing wrong with that, but it is a sign that you might be doing something wrong. If you make a commit, you should be spending some time thinking about what you are doing, what you want to write, and what files are affected.
Having an editor open gives you that time. Using
-m
on the other hand only discourages writing proper multiline messages when they are actually needed. When you already wrote a summary and notice you might want to add a few more lines, it's way easier if you already have an editor than if you just wrote the whole thing on the commandline and would have to delete it all then reproduce it in the editor.very true... I didn't think of it like that
This and what @pandademic said can be resolved by creating terminal aliases for specific commands. For example I have git adcom "msg" which is an alias for "git add ." combined with "git commit -m 'msg'"
yes(off-topic: we could also use git aliases) , that's what I do @damjand , but I just feel that it would make everyone's life a little easier not to have more aliases to remember.
The point of aliases is not just to have shortcuts but to also make commands that are so short and custom-tailored that you don't even have to remember them like you do for built-in commands :)