# ** git 第一周 記錄** >作者:資工琪琪 ###### tags: `Git` 課程參考網址: [Git教學](https://hackmd.io/@gold-shadow/S1hvNYp0O) [Cmder設定教學](https://ithelp.ithome.com.tw/articles/10262144) [github連結](https://github.com/) ## Git安裝流程 1. 先安裝 [Git](https://git-scm.com/download/win) <無腦安裝即可> ## Cmder安裝流程 1. 透過連結將[Cmder](https://cmder.net/)下載下來,請下載完整版(Full) ![](https://i.imgur.com/FD4uGLm.png =70%x) 2. 把下載下來的東西解壓縮後放在你想放的位置(放在 C:/cmder/ 底下)。 ![](https://i.imgur.com/pVvBan4.png =70%x) 3. 設定環境變數:`設定` -> `系統` -> `關於` -> `進階系統設定` -> `環境變數` -> `系統變數` ![](https://i.imgur.com/124NxUR.png =70%x) 4. 在 `Path` -> `新增` C:\cmder\ ![](https://i.imgur.com/1LIJa8U.png =70%x) 5. 開啟 CMD(內建的命令提示字元),輸入 `set PATH=C:` ,讓環境變數立即生效,不用重開機 ![](https://i.imgur.com/RQ3EbmF.png =70%x) 6. 關閉 CMD 再**重啟**,輸入 `echo %PATH%` ,查看是否有增加 `C:\cmder` ![](https://i.imgur.com/D6c1iat.png =70%x) 7. 開啟 cmder,等待初始化結束。 ![](https://i.imgur.com/3qWxaft.png =70%x) 8. 使用工作管理員身分開啟打開cmd ![](https://i.imgur.com/OSnHlpw.png) 9. 打開後輸入 Cmder.exe /REGISTER ALL 執行即可 ![](https://i.imgur.com/DBbuxSB.png) 10. **安裝完成** :100: ## Git & ssh 遠端設定 1. 打開Cmder輸入`ssh-keygen -t ed25519 -C "<your_email@example.com>"` * 或是輸入`ssh-keygen -t rsa -b 4096 -C "<your_email@example.com>"` >範例: 我gmail帳戶為jddj42840@gmail.com那我指令該輸入 >`ssh-keygen -t ed25519 -C "jddj42840@gmail.com"` >剩下的可以先跳過(直接Enter)沒關係 ![](https://i.imgur.com/QGZ3Fq8.png =70%x) 2. 去使用者找 `.ssh`目錄,並將用記事本將`.pub`打開 ![](https://i.imgur.com/hY0mOPo.png =70%x) * 打開內容如下,全部複製 ![](https://i.imgur.com/DAtZexs.png =70%x) 3. 打開 github 點擊右上角的`小頭像`並點擊倒數第二個 `settings` ![](https://i.imgur.com/NZPXQVt.png =70%x) 4. 點擊左邊選擇列的`SSH and GPG keys` ![](https://i.imgur.com/yMmRn39.png =70%x) 5. 點擊 SSH keys 的`New SSH key` ![](https://i.imgur.com/pLQHamN.png =70%x) 6. 將剛剛複製的內容放至 `Key` 裡面,並點擊 `Add SSH Key` ![](https://i.imgur.com/3soh82U.png =70%x) 7. 在表單上會看到你新增的SSH key圖示 ![](https://i.imgur.com/gNTh6KZ.png) 8. 開啟cmder並輸入 `ssh -T git@github.com` >輸入yes之後你會看到 Hi.....這就代表創建成功喔 ![](https://i.imgur.com/jbdn3ZO.png)