-
Notifications
You must be signed in to change notification settings - Fork 0
/
home.html
66 lines (66 loc) · 2.6 KB
/
home.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>测试代码</title>
<link rel="stylesheet" href="./demo.css">
<script src="./demo.js"></script>
</head>
<body>
<div class="box">
THIS IS TEST CODE!
git init //初始化文件
git add . //提交文件至暂存区
git commit -m //上传暂存区代码
git status //查看当前状态
git log //查看提交记录
git log --author=='name' //查看 name 提交记录
英文状态下Q 退出gitlog状态
git push -u origin main //提交暂存区代码
git rm filename //命令行删除filename文件
git mv old_filename new_filename //命令行重命名filename文件
</div>
<div>
git log --pretty=oneline filename
git show ...
git log -p filename //查看filename文件的前后变化
</div>
<div>
git diff //针对文件改动较少的情况下进行还原
git checkout -- filename //针对文件改动较多的时候还原至上一个状态
git reset HEAD filename //撤销追踪状态
</div>
<div>
git tag tagname //给上传版本增加标签
git tag //查看当前拥有的标签
git tag tagname 号码 //给号码对应的版本增加标签
git tag -d tagname //删除tagname的标签
git push origin tagname //给远程仓库增加标签
</div>
<div>
git branch //查看分支
git branch name //创造分支
git checkout name //切换分支
git branch -d name //删除分支
git branch -D name //强制删除分支
git branch -b name //创造分支并切换到该分支
git merge name //将name分支内容合并至目前分支上
</div>
<div>
git log --oneline //简写提交记录
git log --oneline --graph //看每个分支上的提交记录
</div>
<div>
git fetch //从远程仓库获取最新变更到本地仓库
git branch -av //查看分支更改信息
git push origin --delete 分支 //删除分支
</div>
<div>
git clone code filename //从远程仓库上下载源码
git config --add --local user.name/user.email //向当前Git仓库的本地配置中添加或修改
git config --global/local --list //查看git配置
git checkout -b 本地新建分支 远程仓库分支 //从远程仓库上获取分支到本地 与本地分支建立联系
</div>
</body>
</html>