Try   HackMD

初步掌握Git與Github應用(1) Git環境建置

tags: 初步掌握Git與Github應用

希望藉由這份筆記,讓正在學習這類知識的你/妳,能夠得到些許幫助。

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
Hint: 以下筆記內容所使用的作業系統為"Windows 10"

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
安裝Git

Step 1: 前往Git官方網站下載Git

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

  • 根據作業系統的不同,網頁會自動偵測適合的版本,點擊紅框中的下載按鈕即可。

Step 2: 執行安裝檔

原則上用預設的設定就好,持續點擊"Next",最後點擊"Install"即可完成安裝。

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

  • 點擊"Finish"結束

Step 3: 確認是否成功安裝

請打開"命令提示字元(CMD)"並輸入git --version

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
看到類似上方的結果,則表示已成功安裝Git。

Step 4: 查看Git資料夾

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
我們主要會用到的3個東西: Git Bash、Git CMD、Git GUI。(特別是 Git Bash)

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
Hint: 預設安裝路徑為C:\Program Files\Git


Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
BONUS: 更新現有的Git

如果目前的版本是早於 2.14.1 版,請到 Git 官網下載新版,解除安裝本機的 Git 後手動安裝新版,因為這之前的版本沒有提供更新的指令。

如果目前的版本是介於 2.14.22.16.1 之間,可以使用 git update 進行升級。

如果目前的版本是 2.16.1 以上,請使用 git update-git-for-windows 進行升級。

不管是使用哪個指令進行升級,他背後其實也是幫你解除安裝,然後下載新版安裝,但至少不用打開瀏覽器自己去網頁下載。

- 資料來源: 更新本機 Git 到最新版

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
Hint: 以上指令都是輸入在 命令提示字元(CMD) 上。


Last updated 2021/07/11 by Qi Xiang