]> rtime.felk.cvut.cz Git - hubacji1/oneflow.git/commitdiff
Extend commit section in introduction
authorJiri Hubacek <hubacji1@fel.cvut.cz>
Wed, 10 Oct 2018 14:16:47 +0000 (16:16 +0200)
committerJiri Hubacek <hubacji1@fel.cvut.cz>
Wed, 10 Oct 2018 14:20:24 +0000 (16:20 +0200)
intro.md

index 42ce2b8f8b1acd844fe13a9ea75ebebf0530c0c3..69f1cd21a7d989693046831395594f8671d2db12 100644 (file)
--- a/intro.md
+++ b/intro.md
@@ -133,9 +133,21 @@ git reset FILE
 ```
 
 ## Command `git commit`
-When sure that staged changes should be commited to the history, use `git
-commit -m'COMMIT MSG'`. For commit messages, some rules are good to keep in
-mind [1][]:
+When sure that staged changes should be commited to the history, use:
+```
+git commit -m'COMMIT MSG'
+```
+
+Command without parameters will open text editor to let type the commit
+message.
+```
+git commit
+```
+
+Default text editor is `vim`. It can be closed by sequence `<Esc>:q!<Enter>`.
+
+Please, keep these [The seven rules of a great Git commit message][1] when
+writing the git commit messages:
 - Separate subject from body with a blank line.
 - Limit the subject line to 50 characters.
 - Capitalize the subject line.
@@ -144,6 +156,8 @@ mind [1][]:
 - Wrap the body at 72 characters.
 - Use the body to explain what and why vs. how.
 
+[1]: https://chris.beams.io/posts/git-commit/
+
 # Cheat sheet
 Use `git COMMAND --help` for showing the help!
 
@@ -174,5 +188,3 @@ Use `git COMMAND --help` for showing the help!
 - `git reset FILE`
 - `git commit -m'COMMIT MSG'`
 - `git commit`
-
-[1]: https://chris.beams.io/posts/git-commit/