-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
171 lines (156 loc) · 4.39 KB
/
index.html
File metadata and controls
171 lines (156 loc) · 4.39 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="author" content="Allester Corton" />
<link rel="icon" type="image/png" href="logo.png" />
<title>GitHub Guide</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<h1>GitHub Best Practices Guide</h1>
<h2>Branch Naming Conventions</h2>
<table>
<tr>
<th>Branch Type</th>
<th>Naming Convention</th>
<th>Example</th>
</tr>
<tr>
<td>Feature</td>
<td>feature/<name></td>
<td>feature/auth-ui</td>
</tr>
<tr>
<td>Bugfix</td>
<td>fix/<name></td>
<td>fix/input-validation</td>
</tr>
<tr>
<td>Hotfix</td>
<td>hotfix/<name></td>
<td>hotfix/payment-crash</td>
</tr>
<tr>
<td>Enhancement</td>
<td>enhancement/<name></td>
<td>enhancement/performance-boost</td>
</tr>
<tr>
<td>Release</td>
<td>release/<version></td>
<td>release/v1.2.0</td>
</tr>
<tr>
<td>Experiment</td>
<td>experiment/<name></td>
<td>experiment/new-login-flow</td>
</tr>
<tr>
<td>Documentation</td>
<td>docs/<name></td>
<td>docs/api-reference</td>
</tr>
</table>
<h2>Commit Message Structure</h2>
<table>
<tr>
<th>Type</th>
<th>Emoji</th>
<th>Prefix</th>
<th>Example</th>
</tr>
<tr>
<td>Feature</td>
<td>✨</td>
<td>feat:</td>
<td>✨ feat(auth): add password reset page</td>
</tr>
<tr>
<td>Bugfix</td>
<td>🐛</td>
<td>fix:</td>
<td>🐛 fix(ui): resolve input field validation issue</td>
</tr>
<tr>
<td>Refactor</td>
<td>♻️</td>
<td>refactor:</td>
<td>♻️ refactor(signup): optimize form state handling</td>
</tr>
<tr>
<td>Performance</td>
<td>⚡</td>
<td>perf:</td>
<td>⚡ perf(api): reduce database query time</td>
</tr>
<tr>
<td>Style</td>
<td>💄</td>
<td>style:</td>
<td>💄 style(button): improve hover effect</td>
</tr>
<tr>
<td>Documentation</td>
<td>📝</td>
<td>docs:</td>
<td>📝 docs(readme): update installation steps</td>
</tr>
</table>
<h2>Common Git Commands</h2>
<h3>Cloning a Repository</h3>
<pre>git clone <repo-url></pre>
<h3>Creating a New Branch</h3>
<pre>git checkout -b feature/new-feature</pre>
<h3>Switching Branches</h3>
<pre>git checkout main</pre>
<h3>Staging and Committing Changes</h3>
<pre>
git add .
git commit -m "✨ feat(ui): add new login page"</pre
>
<h3>Pushing Changes</h3>
<pre>git push origin feature/new-feature</pre>
<h3>Fetching and Merging Updates</h3>
<pre>
git fetch origin
git merge origin/main</pre
>
<h3>Rebasing a Branch</h3>
<pre>git rebase main</pre>
<h3>Undoing the Last Commit</h3>
<pre>
git reset --soft HEAD~1 # Keep changes
git reset --hard HEAD~1 # Remove changes</pre
>
<h2>Releases and Tags</h2>
<h3>Creating a Tag for a Release</h3>
<pre>git tag -a v1.0.0 -m "Release version 1.0.0"</pre>
<h3>Pushing Tags to Remote</h3>
<pre>git push origin v1.0.0</pre>
<h3>Listing All Tags</h3>
<pre>git tag</pre>
<h3>Creating a GitHub Release</h3>
<ol>
<li>Go to the repository on GitHub.</li>
<li>Navigate to the <b>Releases</b> section.</li>
<li>Click <b>Draft a new release</b>.</li>
<li>Select the tag and add release notes.</li>
<li>Click <b>Publish Release</b>.</li>
</ol>
<h2>General Best Practices</h2>
<ul>
<li>Keep branch names short but descriptive.</li>
<li>Use lowercase and hyphens (-) for branch names.</li>
<li>Follow conventional commits format for commit messages.</li>
<li>
Use imperative mood (e.g., "Add login button" instead of "Added login
button").
</li>
<li>Always fetch and merge before pushing changes.</li>
<li>Use feature branches for new development.</li>
<li>Tag releases properly and document major changes.</li>
</ul>
</body>
</html>