- git init —> 會建立 .git 檔案,存入版本資料
- git add <file> or . —> 登記檔案
- git commit -m "<information>" —> 加入需要標記的資訊
- git status —> 查看 git 狀態
- git log —> 查看 git 歷史訊息 —> git log —oneline 可以看所有紀錄
- git diff <file1> <file2> —> 比對資料有哪些不同
- git reset —Soft, —Mixed, —Hard —> 回復上一次動作
- git rebase —> 合併commit訊息
- git remote -v —> 查看遠端 —> git remote add origin <url> —> 新增遠端儲存庫
- git push <本地> <遠端> —> 推送code到遠端
- git clone <url> —> 將程式碼複製到本地