Git 学习
Windows 初始化操作、基础操作
- 新建文件夹
- 进入文件夹,右击git bash here
1 2 3 4
| $ git init
$ git remote add origin XXX $ git pull
|
基本配置
1 2 3 4 5
| $ git config --global user.name 'username' $ git config --global user.email 'your_email@xx.com' $ git config --list $ git config credential.helper store $ git config http.proxy
|
基本操作
1 2 3 4
| $ git add '文件名' $ git commit -m '描述' $ git push origin master
|
1 2 3 4 5
| $ git remote -v $ git remote remove orign $ git remote add origin 'XXX' $ git remote set-url --add origin "XXX"
|
1 2 3 4 5 6
| $ git branch $ git branch -d master $ git merge master $ git checkout -b main $ git checkout .
|
1 2 3 4 5 6 7 8
| $ git clone -b dev origin $ git fetch origin master $ git pull origin dev
$ git push origin main $ git push -u origin master $ git push -f origin master
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
$ git status
$ git config --global --list $ git config --global user.name $ git remote -v
$ git config --global --add user.name 'xld' $ git remote set-url --add origin "XXX"
$ git config --global --unset user.name
$ git config --global user.name 'xld'
|
菜鸟教程 - Git 基本操作:https://www.runoob.com/git/git-basic-operations.html
Github
1 2 3 4 5 6 7 8 9
|
13.114.40.48 13.250.177.223 13.229.188.59 52.74.223.119 52.192.72.89 140.82.112.4 192.30.255.113
|