![]() If you omit this flag then Git will automatically open a text editor for you to enter the commit message. This works well in Bash, which doesn't enter the command until you've closed the quote: $ git commit index.js -m "My ChangesĪnd finally, you don't actually need to use the -m flag at all. These multiple messages will then look like this in the resulting commit: My ChangesĪnother option, which depends on the shell you're using, is to just enter a single or double quote and press Enter, without closing the quote. An interesting feature of the -m flag is that you can add multiple paragraphs to your message by using the -m flag multiple times in the same commit command: $ git commit index.js -m "My Changes" -m "- Fixed a critical bug" -m "- Probably added more bugs" You can't always describe a complex change with a short, single-line comment. An example of this looks like this: $ git commit index.js -m "Fixed world-ending bug (#281)" Multi-Line Messages Your message should immediately follow the flag and be wrapped in quotation marks. The rest of the commit message is then used for this.In order to add this message, you need to specify the -m flag when executing git commit. The footer should contain any information about Breaking Changes and is also the place to reference GitHub issues that this commit Closes.īreaking Changes should start with the word BREAKING CHANGE: with a space or two newlines. The body should include the motivation for the change and contrast this with previous behavior. Just as in the subject, use the imperative, present tense: “change” not “changed” nor “changes”. use the imperative, present tense: “change” not “changed” nor “changes”.The subject contains succinct description of the change: ![]() ![]() For example $location, $browser, $compile, $rootScope, ngHref, ngClick, ngView, etc… Subject The scope could be anything specifying place of the commit change.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |