-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgit note.cpp
More file actions
46 lines (25 loc) · 1.14 KB
/
git note.cpp
File metadata and controls
46 lines (25 loc) · 1.14 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
/*****************************************************************************************
*****************************************************************************************/
1. git config user.name "Your name"
2. git config user.email "Your email address"
mkdir "directory"
cd "directory"
1. git init // 通过git init命令把这个目录变成Git可以管理的仓库
2. git add // 用命令git add告诉Git,把文件添加到仓库
3. git commit // 用命令git commit告诉Git,把文件提交到仓库
git commit -m "change log"
4. git status
5. git diff "file name"
1. git reset --hard commit_id // HEAD指向的版本就是当前版本,因此,Git允许我们在版本的历史之间穿梭
//===============================================
// 添加远程库
//===============================================
// 本地库与远程库关联
git remote add origin https://github.com/hlym123/enableGit.git
// 把本地库的内容推送到远程库上
git push -u origin master
//===============================================
// 从远程仓库克隆
//===============================================
git clone
git pull