Skip to content

Commit 2ef03b3

Browse files
author
王睿
committed
添加自描述文件
0 parents  commit 2ef03b3

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
## 初始化Git仓库基础指令
2+
3+
##### Git 全局设置
4+
5+
`git config --global user.name "王睿"`
6+
7+
`git config --global user.email "[email protected]"`
8+
9+
##### 创建新版本库
10+
11+
`git clone [email protected]:nihaorz/git-command-study.git`
12+
13+
`cd git-command-study`
14+
15+
`touch README.md`
16+
17+
`git add README.md`
18+
19+
`git commit -m "add README"`
20+
21+
`git push -u origin master`
22+
23+
##### 已存在的文件夹
24+
25+
`cd existing_folder`
26+
27+
`git init`
28+
29+
`git remote add origin [email protected]:nihaorz/git-command-study.git`
30+
31+
`git add .`
32+
33+
`git commit -m "Initial commit"`
34+
35+
`git push -u origin master`
36+
37+
##### 已存在的 Git 版本库
38+
39+
`cd existing_repo`
40+
41+
`git remote rename origin old-origin`
42+
43+
`git remote add origin [email protected]:nihaorz/git-command-study.git`
44+
45+
`git push -u origin --all`
46+
47+
`git push -u origin --tags`

0 commit comments

Comments
 (0)