forked from udacity/git-styleguide
-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
177 lines (122 loc) · 7.24 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>NDITech Commit Style Guide</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="bower_components/normalize.css/normalize.css">
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Roboto:300|Roboto+Condensed:400,700|Inconsolata">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<nav>
<ul>
<li><a href="#" class="active">Commit Style Guide</a></li>
<!--<li><a href="#">Code Versioning</a></li>-->
<li><a href="readme-styleguide.html">README Guide</a></li>
<li><a href="database-requisitions.html">Database Requisition SOP</a></li>
</ul>
</nav>
<h1 id="nditechgitcommitmessagestyleguide">NDITech Git Commit Message Style Guide</h1>
<h2 id="introduction">Introduction</h2>
<p>There are many opinions on the "ideal" style in the world of development. Therefore, in order to reduce the confusion on what style internal and external developers should follow during the course of their projects, we urge all technical team members to refer to this style guide for their projects.</p>
<p>Another good reason to follow the a common commit style guide is that it allows us to later automatically generate CHANGELOG.md from your commit messages. An example of CHANGELOG exporter script is available here. If interested, check out this blog for more information on CHANGELOG.</p>
<h2 id="commitmessages">Commit Messages</h2>
<h3 id="messagestructure">Message Structure</h3>
<p>A commit messages consists of three distinct parts separated by a blank line: the title, an optional body and an optional footer. The layout looks like this:</p>
<pre><code>type: subject
body
footer
</code></pre>
<p>The title consists of the type of the message and subject.</p>
<h3 id="thetype">The Type</h3>
<p>The type is contained within the title and can be one of these types:</p>
<ul>
<li><strong>feat:</strong> a new feature</li>
<li><strong>fix:</strong> a bug fix</li>
<li><strong>docs:</strong> changes to documentation</li>
<li><strong>style:</strong> formatting, missing semi colons, etc; no code change</li>
<li><strong>refactor:</strong> refactoring production code</li>
<li><strong>test:</strong> adding tests, refactoring test; no production code change</li>
<li><strong>chore:</strong> updating build tasks, package manager configs, etc; no production code change</li>
</ul>
<h3 id="thesubject">The Subject</h3>
<p>Subjects should be no greater than 50 characters, should begin with a capital letter and do not end with a period.</p>
<p>Use an imperative tone to describe what a commit does, rather than what it did. For example, use <strong>change</strong>; not changed or changes.</p>
<h3 id="thebody">The Body</h3>
<p>Not all commits are complex enough to warrant a body, therefore it is optional and only used when a commit requires a bit of explanation and context. Use the body to explain the <strong>what</strong> and <strong>why</strong> of a commit, not the how.</p>
<p>When writing a body, the blank line between the title and the body is required and you should limit the length of each line to no more than 72 characters.</p>
<h3 id="thefooter">The Footer</h3>
<p>The footer is optional and is used to reference issue tracker IDs.</p>
<h3 id="examplecommitmessage">Example Commit Message</h3>
<pre><code>feat: Summarize changes in around 50 characters or less
More detailed explanatory text, if necessary. Wrap it to about 72
characters or so. In some contexts, the first line is treated as the
subject of the commit and the rest of the text as the body. The
blank line separating the summary from the body is critical (unless
you omit the body entirely); various tools like `log`, `shortlog`
and `rebase` can get confused if you run the two together.
Explain the problem that this commit is solving. Focus on why you
are making this change as opposed to how (the code explains that).
Are there side effects or other unintuitive consequenses of this
change? Here's the place to explain them.
Further paragraphs come after blank lines.
- Bullet points are okay, too
- Typically a hyphen or asterisk is used for the bullet, preceded
by a single space, with blank lines in between, but conventions
vary here
If you use an issue tracker, put references to them at the bottom,
like this:
Resolves: #123
See also: #456, #789
</code></pre>
<p>Forked from Udacity Style guide doc linked below. </p>
<h1>README Boilerplate</h1>
<h2 id="installation">Installation</h2>
<p>Download to your project directory, add <code>README.md</code>, and commit:</p>
<pre><code class="sh language-sh">curl -LO http://git.io/Xy0Chg
git add README.md
git commit -m "Use README Boilerplate"
</code></pre>
<h2 id="usage">Usage</h2>
<p>Replace the contents of <code>README.md</code> with your project's:</p>
<ul>
<li>Name</li>
<li>Description</li>
<li>Installation instructions</li>
<li>Usage instructions</li>
<li>Support instructions</li>
<li>Contributing instructions</li>
</ul>
<p>Feel free to remove any sections that aren't applicable to your project.</p>
<h3>FAQs</h3>
<ul>
<li><h4>How do I maintain a healthy Github repository?</h4>
<ul>
<li><p>Avoid abandoned or empty project folders. Take the time to remove projects you don't need or groom duplicates.</p> </li>
<li><p>Try to fork projects you intend to modify. In some instances you may need a fork for reference but try avoid cluttering your repositories with too many forks. </p></li>
<li><p>Avoid cryptic naming conventions. </p></li>
<li><p>Make an effort to include a description of and link to your project enough explain in less than the length of a tweet of what your code is trying to accomplish.</p></li>
<li><p>Checkout the Readme Guide and take this style guide to heart. :D</p></li>
</ul>
</li>
<li><h4>How do I create the perfect Github profile?</h4>
<ul>
<li><p>Use your choose a professional handle ideally in the format @ndi-handle and your real name so we know this profile belongs to you.</p> </li>
<li><p>Profile images are optional but should you choose one, use a professional profile image of yourself so that we can put your face to your code.</p></li>
<li><p>Take the time to include vital information such as work contact information so that external teams can find you in one place.</p></li>
</ul>
</li>
</ul>
<h3> References </h3>
<ul>
<li><a href="https://github.com/fraction/readme-boilerplate">README Boilerplate</a></li>
<li><a href="http://udacity.github.io/frontend-nanodegree-styleguide/index.html">HTML</a></li>
<li><a href="http://udacity.github.io/frontend-nanodegree-styleguide/css.html">agis-/git-style-guide</a></li>
<li><a href="http://udacity.github.io/frontend-nanodegree-styleguide/javascript.html">How to Write a Git Commit Message</a></li>
<li><a href="index.html">5 Useful Tips For A Better Commit Message</a></li>
<li><a href="index.html">A Note About Git Commit Messages</a></li>
<li><a href="index.html">Udacity - How to Use Git and GitHub</a></li>
</ul>
</body>
</html>