git init
初始化一個 git 倉庫
1.1 進入需要使用git 管理的文件初始化一個倉庫
git init
git add
提交代碼到暫存區
1.1 使用add 提交代碼到暫存區
git add[<file>]
git commit
提交代碼到版本庫
1.1 將編輯好的代碼提交到版本庫
git commit [<file>] -m "備註信息"
1.2 更改最近一次提交的備註信息
git commit --amend [<file>] -m "新的備註信息"
1.3 查看提交的詳細修改內容
git commit --verbose
git status
查看當前工作目錄中文件狀態
1.1 查看工作目錄中文件狀態
git status [<file>]