提交
This commit is contained in:
parent
ecd0dc9969
commit
fbca869972
42
source/_posts/Git.md
Normal file
42
source/_posts/Git.md
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
# Git
|
||||||
|
|
||||||
|
## Git 全局设置:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
git config --global user.name "wenyongda"
|
||||||
|
git config --global user.email "bmdzh11713@163.com"
|
||||||
|
```
|
||||||
|
|
||||||
|
## 创建 git 仓库:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
mkdir aaa
|
||||||
|
cd aaa
|
||||||
|
git init
|
||||||
|
touch README.md
|
||||||
|
git add README.md
|
||||||
|
git commit -m "first commit"
|
||||||
|
git remote add origin https://gitee.com/wenyongda/aaa.git
|
||||||
|
git push -u origin master
|
||||||
|
```
|
||||||
|
|
||||||
|
## 已有仓库
|
||||||
|
|
||||||
|
```shell
|
||||||
|
cd existing_git_repo
|
||||||
|
git remote add origin https://gitee.com/wenyongda/aaa.git
|
||||||
|
git push -u origin master
|
||||||
|
```
|
||||||
|
|
||||||
|
## 查看作者名称、作者邮箱
|
||||||
|
|
||||||
|
```shell
|
||||||
|
git config user.name
|
||||||
|
git config user.email
|
||||||
|
git config --list
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user