-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
359 lines (359 loc) · 14.4 KB
/
Copy pathindex.html
File metadata and controls
359 lines (359 loc) · 14.4 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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="CodeClub - Git 教程" />
<meta name="author" content="Jackson" />
<title>Git 教程 - CodeClub</title>
<link rel="icon" type="image/x-icon" href="../../img/logo.png" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link
href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap"
rel="stylesheet"
/>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css"
="anonymous"
referrerpolicy="no-referrer"
/>
<link rel="stylesheet" href="../../css/main.css" />
<link rel="stylesheet" href="../../css/dark-mode.css" />
<link rel="stylesheet" href="../../css/mobile-optimizations.css" />
<link rel="stylesheet" href="../../css/tutorial.css" />
<style>
.tutorial-container {
max-width: 960px;
margin: 70px auto 40px;
padding: 0 20px;
}
.tutorial-sidebar {
position: fixed;
top: 70px;
left: 20px;
width: 260px;
max-height: calc(100vh - 90px);
overflow-y: auto;
background: var(--bg-secondary, #fff);
border-radius: 8px;
padding: 16px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.tutorial-sidebar h3 {
font-size: 16px;
margin-bottom: 12px;
color: var(--text-primary, #1a1a2e);
}
.tutorial-sidebar a {
display: block;
padding: 6px 10px;
color: var(--text-secondary, #666);
text-decoration: none;
font-size: 14px;
border-radius: 4px;
}
.tutorial-sidebar a:hover,
.tutorial-sidebar a.active {
background: var(--primary, #3b82f6);
color: #fff;
}
.tutorial-sidebar .sub-link {
padding-left: 24px;
font-size: 13px;
}
.tutorial-content {
margin-left: 300px;
background: var(--bg-secondary, #fff);
border-radius: 8px;
padding: 32px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.tutorial-content h1 {
font-size: 28px;
margin-bottom: 20px;
color: var(--text-primary, #1a1a2e);
border-bottom: 2px solid var(--primary, #3b82f6);
padding-bottom: 12px;
}
.tutorial-content h2 {
font-size: 22px;
margin: 24px 0 16px;
color: var(--text-primary, #1a1a2e);
}
.tutorial-content h3 {
font-size: 18px;
margin: 20px 0 12px;
}
.tutorial-content p {
line-height: 1.8;
margin: 12px 0;
color: var(--text-secondary, #333);
}
.tutorial-content pre {
background: #1e1e2e;
color: #cdd6f4;
padding: 16px;
border-radius: 8px;
overflow-x: auto;
margin: 16px 0;
}
.tutorial-content code {
font-family: 'Fira Code', 'Cascadia Code', monospace;
font-size: 14px;
}
.tutorial-content p code {
background: #f1f5f9;
padding: 2px 6px;
border-radius: 4px;
color: #e83e8c;
}
.tutorial-content blockquote {
border-left: 4px solid var(--primary, #3b82f6);
padding: 12px 20px;
margin: 16px 0;
background: #f8fafc;
border-radius: 0 8px 8px 0;
}
.tutorial-content ul,
.tutorial-content ol {
padding-left: 24px;
margin: 12px 0;
}
.tutorial-content li {
margin: 6px 0;
line-height: 1.7;
}
.tutorial-content img {
max-width: 100%;
border-radius: 8px;
margin: 16px 0;
}
.tutorial-nav {
display: flex;
justify-content: space-between;
margin-top: 32px;
padding-top: 20px;
border-top: 1px solid var(--border, #e5e7eb);
}
.tutorial-nav a {
color: var(--primary, #3b82f6);
text-decoration: none;
font-weight: 500;
}
.tutorial-nav a:hover {
text-decoration: underline;
}
.tutorial-index {
max-width: 960px;
margin: 70px auto 40px;
padding: 0 20px;
}
.tutorial-card {
background: var(--bg-secondary, #fff);
border-radius: 12px;
padding: 24px;
margin: 16px 0;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
transition: transform 0.2s;
}
.tutorial-card:hover {
transform: translateY(-2px);
}
.tutorial-card h3 {
margin: 0 0 8px;
color: var(--text-primary, #1a1a2e);
}
.tutorial-card p {
color: var(--text-secondary, #666);
margin: 0 0 12px;
}
.tutorial-card .badge {
display: inline-block;
padding: 4px 10px;
border-radius: 20px;
font-size: 12px;
font-weight: 600;
margin-right: 8px;
}
.badge-python {
background: #3b82f6;
color: #fff;
}
.badge-git {
background: #f97316;
color: #fff;
}
.badge-ai {
background: #8b5cf6;
color: #fff;
}
@media (max-width: 768px) {
.tutorial-sidebar {
display: none;
}
.tutorial-content {
margin-left: 0;
}
}
</style>
</head>
<body>
<nav class="navbar">
<div class="navbar-container">
<a class="navbar-brand" href="../../index.html">
<img src="../../img/logo.png" alt="CodeClub" width="32" height="32" />
<span>CodeClub</span>
</a>
<button class="mobile-menu-toggle" aria-label="切换导航菜单"><span></span><span></span><span></span></button>
<ul class="navbar-nav">
<li><a class="nav-link" href="../../index.html">首页</a></li>
<li><a class="nav-link" href="../../nav.html">网址导航</a></li>
<li><a class="nav-link" href="../../blog/">博客</a></li>
<li><a class="nav-link" href="../../wiki/index.html" target="_blank">WiKi</a></li>
<li><a class="nav-link active" href="../../tutorials/index.html">教程</a></li>
<li><a class="nav-link" href="../../book.html">图书</a></li>
<li><a class="nav-link" href="../../contact.html">联系我</a></li>
<li><a class="nav-link" href="../../about.html">关于我</a></li>
</ul>
</div>
</nav>
<div class="tutorial-container" style="max-width: 960px; margin: 80px auto 40px; padding: 0 20px">
<div class="tutorial-sidebar">
<h3>目录</h3>
<a href="0.html">1. 简介</a><a href="1.html">2. Git是什么</a><a href="2.html">2.1. Git的诞生</a
><a href="3.html">2.2. 集中式vs分布式</a><a href="4.html">3. 安装Git</a><a href="5.html">4. 创建版本库</a
><a href="6.html">5. 时光机穿梭</a><a href="7.html">5.1. 版本回退</a><a href="8.html">5.2. 工作区和暂存区</a
><a href="9.html">5.3. 管理修改</a><a href="10.html">5.4. 撤销修改</a><a href="11.html">5.5. 删除文件</a
><a href="12.html">6. 远程仓库</a><a href="13.html">6.1. 添加远程库</a><a href="14.html">6.2. 从远程库克隆</a
><a href="15.html">7. 分支管理</a><a href="16.html">7.1. 创建与合并分支</a><a href="17.html">7.2. 解决冲突</a
><a href="18.html">7.3. 分支管理策略</a><a href="19.html">7.4. Bug分支</a><a href="20.html">7.5. Feature分支</a
><a href="21.html">7.6. 多人协作</a><a href="22.html">7.7. Rebase</a><a href="23.html">8. 标签管理</a
><a href="24.html">8.1. 创建标签</a><a href="25.html">8.2. 操作标签</a><a href="26.html">9. 使用GitHub</a
><a href="27.html">10. 使用Gitee</a><a href="28.html">11. 自定义Git</a><a href="29.html">11.1. 忽略特殊文件</a
><a href="30.html">11.2. 配置别名</a><a href="31.html">11.3. 搭建Git服务器</a
><a href="32.html">12. 使用SourceTree</a><a href="33.html">13. 期末总结</a>
</div>
<div class="tutorial-content">
<h1>Git 教程</h1>
<div class="toc-list">
<p style="padding-left: 16px">
<a href="0.html" style="color: var(--primary, #3b82f6); text-decoration: none">1. 简介</a>
</p>
<p style="padding-left: 16px">
<a href="1.html" style="color: var(--primary, #3b82f6); text-decoration: none">2. Git是什么</a>
</p>
<p style="padding-left: 16px">
<a href="2.html" style="color: var(--primary, #3b82f6); text-decoration: none">2.1. Git的诞生</a>
</p>
<p style="padding-left: 16px">
<a href="3.html" style="color: var(--primary, #3b82f6); text-decoration: none">2.2. 集中式vs分布式</a>
</p>
<p style="padding-left: 16px">
<a href="4.html" style="color: var(--primary, #3b82f6); text-decoration: none">3. 安装Git</a>
</p>
<p style="padding-left: 16px">
<a href="5.html" style="color: var(--primary, #3b82f6); text-decoration: none">4. 创建版本库</a>
</p>
<p style="padding-left: 16px">
<a href="6.html" style="color: var(--primary, #3b82f6); text-decoration: none">5. 时光机穿梭</a>
</p>
<p style="padding-left: 16px">
<a href="7.html" style="color: var(--primary, #3b82f6); text-decoration: none">5.1. 版本回退</a>
</p>
<p style="padding-left: 16px">
<a href="8.html" style="color: var(--primary, #3b82f6); text-decoration: none">5.2. 工作区和暂存区</a>
</p>
<p style="padding-left: 16px">
<a href="9.html" style="color: var(--primary, #3b82f6); text-decoration: none">5.3. 管理修改</a>
</p>
<p style="padding-left: 16px">
<a href="10.html" style="color: var(--primary, #3b82f6); text-decoration: none">5.4. 撤销修改</a>
</p>
<p style="padding-left: 16px">
<a href="11.html" style="color: var(--primary, #3b82f6); text-decoration: none">5.5. 删除文件</a>
</p>
<p style="padding-left: 16px">
<a href="12.html" style="color: var(--primary, #3b82f6); text-decoration: none">6. 远程仓库</a>
</p>
<p style="padding-left: 16px">
<a href="13.html" style="color: var(--primary, #3b82f6); text-decoration: none">6.1. 添加远程库</a>
</p>
<p style="padding-left: 16px">
<a href="14.html" style="color: var(--primary, #3b82f6); text-decoration: none">6.2. 从远程库克隆</a>
</p>
<p style="padding-left: 16px">
<a href="15.html" style="color: var(--primary, #3b82f6); text-decoration: none">7. 分支管理</a>
</p>
<p style="padding-left: 16px">
<a href="16.html" style="color: var(--primary, #3b82f6); text-decoration: none">7.1. 创建与合并分支</a>
</p>
<p style="padding-left: 16px">
<a href="17.html" style="color: var(--primary, #3b82f6); text-decoration: none">7.2. 解决冲突</a>
</p>
<p style="padding-left: 16px">
<a href="18.html" style="color: var(--primary, #3b82f6); text-decoration: none">7.3. 分支管理策略</a>
</p>
<p style="padding-left: 16px">
<a href="19.html" style="color: var(--primary, #3b82f6); text-decoration: none">7.4. Bug分支</a>
</p>
<p style="padding-left: 16px">
<a href="20.html" style="color: var(--primary, #3b82f6); text-decoration: none">7.5. Feature分支</a>
</p>
<p style="padding-left: 16px">
<a href="21.html" style="color: var(--primary, #3b82f6); text-decoration: none">7.6. 多人协作</a>
</p>
<p style="padding-left: 16px">
<a href="22.html" style="color: var(--primary, #3b82f6); text-decoration: none">7.7. Rebase</a>
</p>
<p style="padding-left: 16px">
<a href="23.html" style="color: var(--primary, #3b82f6); text-decoration: none">8. 标签管理</a>
</p>
<p style="padding-left: 16px">
<a href="24.html" style="color: var(--primary, #3b82f6); text-decoration: none">8.1. 创建标签</a>
</p>
<p style="padding-left: 16px">
<a href="25.html" style="color: var(--primary, #3b82f6); text-decoration: none">8.2. 操作标签</a>
</p>
<p style="padding-left: 16px">
<a href="26.html" style="color: var(--primary, #3b82f6); text-decoration: none">9. 使用GitHub</a>
</p>
<p style="padding-left: 16px">
<a href="27.html" style="color: var(--primary, #3b82f6); text-decoration: none">10. 使用Gitee</a>
</p>
<p style="padding-left: 16px">
<a href="28.html" style="color: var(--primary, #3b82f6); text-decoration: none">11. 自定义Git</a>
</p>
<p style="padding-left: 16px">
<a href="29.html" style="color: var(--primary, #3b82f6); text-decoration: none">11.1. 忽略特殊文件</a>
</p>
<p style="padding-left: 16px">
<a href="30.html" style="color: var(--primary, #3b82f6); text-decoration: none">11.2. 配置别名</a>
</p>
<p style="padding-left: 16px">
<a href="31.html" style="color: var(--primary, #3b82f6); text-decoration: none">11.3. 搭建Git服务器</a>
</p>
<p style="padding-left: 16px">
<a href="32.html" style="color: var(--primary, #3b82f6); text-decoration: none">12. 使用SourceTree</a>
</p>
<p style="padding-left: 16px">
<a href="33.html" style="color: var(--primary, #3b82f6); text-decoration: none">13. 期末总结</a>
</p>
</div>
<p style="margin-top: 20px; color: var(--text-secondary, #666)">
原文来源:<a href="https://liaoxuefeng.com/books/git/" style="color: var(--primary, #3b82f6)"
>廖雪峰的官方网站</a
>
</p>
</div>
</div>
<footer class="footer">
<div class="footer-content">
<p>© 2024 CodeClub. All rights reserved.</p>
</div>
</footer>
<script src="../../js/dark-mode.js"></script>
<script src="../../js/mobile-menu.js"></script>
</body>
</html>