Git/提交修改
来自康健生活
< Git
提交
add
| 参数 | 描述 | 示例 |
|---|---|---|
| . | 当前目录全部,递归子目录 | git add . |
| --all | 当前项目全部,递归子目录 | git add --all |
| 文件相对地址 | 部分 | git add src/a.js |
commit
命令合并
现在我们将文件 a.js 加入暂存区并提交 commit 信息。
git add /src/a.js
git commit -m "edit the file"
可以将存储至暂存区和打 commit 的两个命令进行简化为一行。
git commit -a -m "edit the file"
No categories