You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by Apache Wiki <wi...@apache.org> on 2013/01/11 18:52:15 UTC

[Cordova Wiki] Update of "ContributorWorkflow" by MarcelKinard

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Cordova Wiki" for change notification.

The "ContributorWorkflow" page has been changed by MarcelKinard:
http://wiki.apache.org/cordova/ContributorWorkflow?action=diff&rev1=11&rev2=12

  {{{
  $ git add accelerometer/watchPosition.md
  $ git status
- $ git commit -m "Add iPhone as supported for accelerometer.watchPosition."
+ $ git commit
  }}}
   
- Alternatively, you could combine staging and committing by using git commit -am "...." 
+ ==== About Commit Messages ====
+ 
+ You are highly encouraged to describe your {{{git commit}}} with enough detail for someone else to understand it. In doing so, your commit message can consist of multiple lines. However, it also is highly encouraged that the first line of your commit message not exceed 50 characters. This is because some of the tooling that sits on top of git (such as the httpd apps that let you browse the repo) assume that the first line is top-level summary that is 50 characters or less. Thus there will be highlighting and truncating of the commit message using these assumptions, and it will look weird if these assumptions are not kept. For example, here is a good example of a commit message:
+ 
+ {{{
+ CB-1234: Fixed the whizbang widget
+ 
+ - added more sanity checking in the build script.
+ - fixed the API to return the correct value in the scenario where there 
+   aren't any whizbangs present.
+ - corrected the documentation.
+ 
+ As an alternate to a bullet list, you could put long text here in
+ paragraph form, with each line wrapped at 72 chars and blank lines
+ between paragraphs.
+ }}}
+ 
+ Note that the first line does two things: (1) it is less than 50 characters. Subsequent lines after the first may exceed 50 characters. (2) it references a Jira issue by its id (CB-1234). Commonly, there should be a Jira issue open for defects and new features, and it is good practice for commits to point to the Jira issue they are addressing. And vice versa, you should add a comment to the Jira issue referencing the commit id(s) that contain your work.
+ 
+ Long commit messages are not necessary, especially if there is a reference to a Jira item. More good advice on this topic is in the [[http://git-scm.com/book/ch5-2.html#Commit-Guidelines|Git book]].
   
  === Commit More File Changes ===
  
  {{{
  $ [ edit accelerometer/watchPosition.md ]
- $ git commit -am "Fix syntax error watchPosition example." 
+ $ git commit -a
  }}}
   
  === Prepare to Send Pull Request ===