終端機 & Git 指令


Posted by hoyi-23 on 2021-09-30

Git 軟體安裝
Github 註冊登入

終端機入門指令

| Windows | MacOS | 說明 |
| cd | cd | 前往資料夾路徑 |
| pwd | pwd |取得目前所在的位置|
| mkdir | mkdir |新增資料夾|
| touch | touch |開新檔案|
| copy | cp |複製檔案|
| move | mv |移動檔案|
| del | rm |刪除檔案|
| cls | clear |清除畫面上的內容|

Github 入門指令

前置設定

  1. 在終端機裡面輸入:git --version //檢查git是否安裝成功
  2. 設定個人資料
  • 輸入姓名:git config --global user.name "gon"
  • 輸入個人的 email:git config --global user.email "gonsakon@gmail.com"
  • 查詢 git 設定內容:git config --list

常用命令

1.初始化數據庫: git init
2.查詢當前狀態:git status
3.將檔案加入到索引:git add .
4.將索引檔案變成一個更新(commit):git commit -m "新增網頁環境"
5.觀察 commit 歷史紀錄: git log
6.下載遠端數據庫: git clone 數據庫網址
7.更新遠端數據庫: git push origin master
8.強制更新遠端數據庫: git push -f


#Git







Related Posts

[AI人工智能] 二、安裝python虛擬環境 + pytorch

[AI人工智能] 二、安裝python虛擬環境 + pytorch

Command Line Interface (CLI) 超入門

Command Line Interface (CLI) 超入門

MTR04_0728

MTR04_0728


Comments