# Git ![](https://i.imgur.com/5VQFlNj.jpg) ## [安裝Git](https://git-scm.com/) - 安裝位置 (一直Next即可) ![](https://i.imgur.com/2jH5mRu.png) ## 開啟Git - Windows - 開始 > 搜尋輸入 > Git Bash or Cmd - Mac - 輸入「control + 空白」,關鍵字輸入「終端機 / Terminal」 ### 查看安裝是否有成功? 查看版本 ``` git --version ``` ![](https://i.imgur.com/Tz9lkZf.png) ## 設定Git個人資料 ``` * 輸入姓名: git config --global user.name "yourname" * 輸入個人的 email: git config --global user.email "youremail@gmail.com" * 查詢 git 設定內容: git config --list ``` ![](https://i.imgur.com/lnUNviU.png) ## 使用Git 1. 前往欲使用Git的資料夾 2. git init (新增數據庫) 3. git add. 4. git commit -m "xxxxx" ## Cmd指令 ![](https://i.imgur.com/dXEoQPc.png) ## 設定Github ssh - [使用 SSH 連接/上傳到你的 GitHub(Ed25519) Ray](https://israynotarray.com/git/20210709/1381487661/) - [Generating a new SSH key](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)