顯示源代碼管理
改鍵
- settings.json
{
"before": ["<Leader>", "g", "g"],
"commands": ["workbench.view.scm"]
}
將當(dāng)前文件添加到暫存區(qū)(等價(jià)于 git add 當(dāng)前文件)
改鍵
{
"before": ["<Leader>", "g", "s"],
"commands": ["git.stage"]
}
查看當(dāng)前文件變更
{
"before": ["<Leader>", "g", "d", "f"],
"commands": ["git.openChange"]
}
提交代碼
{
"before": ["<Leader>", "g", "c"],
"commands": ["git.commit"]
}
然后再 輸入框輸入提交信息钙皮,按回車
從暫存區(qū)里移除當(dāng)前文件
{
"before": ["<Leader>", "g", "u"],
"commands": ["git.unstage"]
}
從變更中移除當(dāng)前文件
{
"before": ["<Leader>", "g", "c", "l"],
"commands": ["git.clean"]
}
擴(kuò)展 edamagit
- option x + g 彈出 git 操作框
我們修改保存文件后會(huì)同步更改狀態(tài)
對(duì)我們修改的文件我們可以使用jk移動(dòng)到文件列表上然后使用 tab 顯示具體的文件變更
- s
將文件添加到暫存區(qū) - u
從暫存區(qū)移除 - c
回車輸入提交信息 :wq - l
查看提交記錄