>軟件安裝
###1.安裝GIT

- #####安裝成功

###1.2 安裝TortoiseGit
######1.用于顯示文件的狀態
######2.用郵箱注冊
>注冊碼云建項目
- ##創建項目test
>git的配置
###2.1 https的配置
- ######1 復制地址

- ######2 打開磁盤 如:D盤

- ######3 復制項目到本地
~~~
student@STUDENT-PC020 MINGW32 /d
$ git clone https://gitee.com/dingmeili/test.git <--復制命令-->
fatal: destination path 'test' already exists and is not an empty directory.
~~~
###2.2 ssh的配置
- 配置公鑰



- ######將id-rsa.pub的內容復制到鑰匙里面
- ######其他如https
###2.3 https和ssh的區別
-######https上傳要密碼,ssh可以免密
###2.4 git的三個區及項目上傳

~~~
git add . //添加到暫存區
git commit -m"xx" //添加到版本庫xx為注釋
git push //推送到遠程
~~~
>vscode的環境配置
* ###3.1插件安裝
```
Open in browser
```
* ###3.2快捷的配置
######將以下內容按后面的步驟粘貼進`keybindings.json`
```
[
{ "key": "alt+/", "command": "editor.action.triggerSuggest","when": "editorTextFocus" },
{ "key": "ctrl+d", "command": "editor.action.deleteLines","when": "editorTextFocus" },
{ "key": "ctrl+alt+down","command": "editor.action.copyLinesDownAction", "when": "editorTextFocus" },
{ "key": "ctrl+alt+up", "command": "editor.action.copyLinesUpAction", "when": "editorTextFocus" },
{ "key": "shift+enter", "command": "editor.action.insertLineAfter", "when": "editorTextFocus && !editorReadonly" } ,
{"key":"ctrl+w","command": "extension.openInBrowser" , "when": "editorTextFocus" }
]
```



>問題
#####1 本地文件刪了,云端上沒刪,本地重建不能上傳
~~~
git add . git commit -m"css" git push 本地云端全刪了
~~~
#####2云端刪了,本地沒刪
~~~
先備份本地文件
再git pull 讓本地與云端同步
~~~
>如果本地刪了,想從云端搞下來,你就直接克隆吧