-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
157 lines (125 loc) · 9.57 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
<!DOCTYPE html>
<html><head>
<meta name="generator" content="Hugo 0.128.0">
<script async src="https://www.googletagmanager.com/gtag/js?id=G-RH9YBHW509"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-RH9YBHW509');
</script>
<link rel="stylesheet" href="/css/style.css">
<title>Conventional Branch</title>
<meta name="description" content="A specification for adding human and machine readable meaning to branch"/>
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1,maximum-scale=1,user-scalable=no">
<meta name="twitter:card" content="A specification for adding human and machine readable meaning to branch">
<meta name="twitter:title" content="Conventional Branch">
<meta name="twitter:description" content="A specification for adding human and machine readable meaning to branch">
<meta property="og:title" content="Conventional Branch"/>
<meta property="og:type" content="article"/>
<meta property="og:url" content="/"/>
<meta property="og:description" content="A specification for adding human and machine readable meaning to branch"/>
<meta property="og:site_name" content="Conventional Branch"/>
</head>
<body class="conventional-branch--loading"><header class="header">
<div class="container">
<a href="/">
<div class="logo"></div>
</a>
<ul class="header__menu">
<li class="header__menu-item dropdown">
<button class="dropdown__label">Languages</button>
<ul class="dropdown__options">
<li class="dropdown__option"><a href="/">English</a></li>
<li class="dropdown__option"><a href="/zh/">中文</a></li>
</ul>
</li>
<li class="header__menu-item dropdown">
<button class="dropdown__label">
<a href="/about" class="no-style-a">About</a>
</button>
</li>
</ul>
</div>
</header>
<section class="welcome">
<div class="container">
<h1 class="welcome__title">Conventional Branch</h1>
<p class="welcome__description">A specification for adding human and machine readable meaning to branch</p>
<div class="welcome__actions">
<a class="welcome__action" href="#summary">Quick Summary</a>
<a class="welcome__action" href="#specification">Full Specification</a>
<a class="welcome__action" href="https://github.com/conventional-branch/conventional-branch">Contribute</a>
</div>
<figure class="welcome__image">
<img src='/img/git-flow-welcome.png'>
</figure>
</div>
</section>
<main>
<article class="container markdown-body">
<h1 id="conventional-branch-100">Conventional Branch 1.0.0</h1>
<h2 id="summary">Summary</h2>
<p>Conventional Branch refers to a structured and standardized naming convention for Git branches which aims to make branch more readable and actionable. We’ve suggested some branch prefixes you might want to use but you can also specify your own naming convention. A consistent naming convention makes it easier to identify branches by type.</p>
<h3 id="key-points">Key Points</h3>
<ol>
<li><strong>Purpose-driven Branch Names</strong>: Each branch name clearly indicates its purpose, making it easy for all developers to understand what the branch is for.</li>
<li><strong>Integration with CI/CD</strong>: By using consistent branch names, it can help automated systems (like Continuous Integration/Continuous Deployment pipelines) to trigger specific actions based on the branch type (e.g., auto-deployment from release branches).</li>
<li><strong>Team Collaboration</strong> : It encourages collaboration within teams by making branch purpose explicit, reducing misunderstandings and making it easier for team members to switch between tasks without confusion.</li>
</ol>
<h2 id="specification">Specification</h2>
<h3 id="branch-naming-prefixes">Branch Naming Prefixes</h3>
<p>The branch specification by describing with <code>feature/</code>, <code>bugfix/</code>, <code>hotfix/</code>, <code>release/</code> and <code>chore/</code> and it should be structured as follows:</p>
<hr>
<pre tabindex="0"><code><type>/<description>
</code></pre><ul>
<li><strong>main</strong>: The main development branch (e.g., <code>main</code>, <code>master</code>, or <code>develop</code>)</li>
<li><strong>feature/</strong>: For new features (e.g., <code>feature/add-login-page</code>)</li>
<li><strong>bugfix/</strong>: For bug fixes (e.g., <code>bugfix/fix-header-bug</code>)</li>
<li><strong>hotfix/</strong>: For urgent fixes (e.g., <code>hotfix/security-patch</code>)</li>
<li><strong>release/</strong>: For branches preparing a release (e.g., <code>release/v1.2.0</code>)</li>
<li><strong>chore/</strong>: For non-code tasks like dependency, docs updates (e.g., <code>chore/update-dependencies</code>)</li>
</ul>
<hr>
<h3 id="basic-rules">Basic Rules</h3>
<ol>
<li><strong>Lowercase and Hyphen-Separated</strong>: Always use lowercase letters, and separate words with hyphens. For example, <code>feature/new-login</code> or <code>bugfix/header-styling</code>.</li>
<li><strong>Alphanumeric and Hyphens Only</strong>: Use only lowercase letters (a-z), numbers (0-9), and hyphens. Avoid special characters like spaces, punctuation, and underscores.</li>
<li><strong>No Consecutive Hyphens</strong>: Ensure that hyphens are used singly, with no consecutive hyphens (e.g., <code>feature/new-login</code>, not <code>feature/new--login</code>).</li>
<li><strong>No Trailing Hyphens</strong>: Do not add a hyphen at the end of the branch name. For instance, use <code>feature/new-login</code> instead of <code>feature/new-login-</code>.</li>
<li><strong>Clear and Concise</strong>: Make branch names descriptive but concise. The name should clearly indicate the work being done.</li>
<li><strong>Include Jira (or Other Tool) Ticket Numbers</strong>: If applicable, include the ticket number from your project management tool to make tracking easier. For example, for a ticket <code>T-123</code>, the branch name could be <code>feature/T-123-new-login</code>.</li>
</ol>
<h2 id="conclusion">Conclusion</h2>
<ul>
<li><strong>Clear Communication</strong>: The branch name alone provides a clear understanding of its purpose the code change.</li>
<li><strong>Automation-Friendly</strong>: Easily hooks into automation processes (e.g., different workflows for <code>feature</code>, <code>release</code>, etc.).</li>
<li><strong>Scalability</strong>: Works well in large teams where many developers are working on different tasks simultaneously.</li>
</ul>
<p>In summary, conventional branch is designed to improve project organization, communication, and automation within Git workflows.</p>
<h2 id="faq">FAQ</h2>
<h3 id="what-tools-can-be-used-to-automatically-identify-if-a-team-member-does-not-meet-this-specification">What tools can be used to automatically identify if a team member does not meet this specification?</h3>
<p>You can used <a href="https://github.com/commit-check/commit-check">commit-check</a> to check branch specification or <a href="https://github.com/commit-check/commit-check-action">commit-check-action</a> if your codes are hosted on GitHub.</p>
</article>
</main><footer class="footer">
<div class="container">
<div class="footer__license">
<p>License</p>
<a href="https://creativecommons.org/licenses/by/3.0/" target="_blank">Creative Commons - CC BY 3.0</a>
</div>
<div class="footer__logos">
<a class="footer__logo" href="https://github.com/conventional-branch/conventional-branch"><svg class="github" viewBox="0 0 128 128">
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M64 5.103c-33.347 0-60.388 27.035-60.388 60.388 0 26.682 17.303 49.317 41.297 57.303 3.017.56 4.125-1.31 4.125-2.905 0-1.44-.056-6.197-.082-11.243-16.8 3.653-20.345-7.125-20.345-7.125-2.747-6.98-6.705-8.836-6.705-8.836-5.48-3.748.413-3.67.413-3.67 6.063.425 9.257 6.223 9.257 6.223 5.386 9.23 14.127 6.562 17.573 5.02.542-3.903 2.107-6.568 3.834-8.076-13.413-1.525-27.514-6.704-27.514-29.843 0-6.593 2.36-11.98 6.223-16.21-.628-1.52-2.695-7.662.584-15.98 0 0 5.07-1.623 16.61 6.19C53.7 35 58.867 34.327 64 34.304c5.13.023 10.3.694 15.127 2.033 11.526-7.813 16.59-6.19 16.59-6.19 3.287 8.317 1.22 14.46.593 15.98 3.872 4.23 6.215 9.617 6.215 16.21 0 23.194-14.127 28.3-27.574 29.796 2.167 1.874 4.097 5.55 4.097 11.183 0 8.08-.07 14.583-.07 16.572 0 1.607 1.088 3.49 4.148 2.897 23.98-7.994 41.263-30.622 41.263-57.294C124.388 32.14 97.35 5.104 64 5.104z"></path>
<path
d="M26.484 91.806c-.133.3-.605.39-1.035.185-.44-.196-.685-.605-.543-.906.13-.31.603-.395 1.04-.188.44.197.69.61.537.91zm-.743-.55M28.93 94.535c-.287.267-.85.143-1.232-.28-.396-.42-.47-.983-.177-1.254.298-.266.844-.14 1.24.28.394.426.472.984.17 1.255zm-.575-.618M31.312 98.012c-.37.258-.976.017-1.35-.52-.37-.538-.37-1.183.01-1.44.373-.258.97-.025 1.35.507.368.545.368 1.19-.01 1.452zm0 0M34.573 101.373c-.33.365-1.036.267-1.552-.23-.527-.487-.674-1.18-.343-1.544.336-.366 1.045-.264 1.564.23.527.486.686 1.18.333 1.543zm0 0M39.073 103.324c-.147.473-.825.688-1.51.486-.683-.207-1.13-.76-.99-1.238.14-.477.823-.7 1.512-.485.683.206 1.13.756.988 1.237zm0 0M44.016 103.685c.017.498-.563.91-1.28.92-.723.017-1.308-.387-1.315-.877 0-.503.568-.91 1.29-.924.717-.013 1.306.387 1.306.88zm0 0M48.614 102.903c.086.485-.413.984-1.126 1.117-.7.13-1.35-.172-1.44-.653-.086-.498.422-.997 1.122-1.126.714-.123 1.354.17 1.444.663zm0 0"></path>
</svg>
</a>
</div>
</div>
</footer>
<script src="/js/bundle.js"></script>
</body>
</html>