Git/分支:修订间差异
来自康健生活
| 第1行: | 第1行: | ||
== 命令合并 == | == 命令合并 == | ||
现在我们将文件 a.js 加入暂存区并提交 commit 信息。 | |||
<syntaxhighlight lang="bash"> | |||
git add /src/a.js | git add /src/a.js | ||
git commit -m "edit the file"</syntaxhighlight> | git commit -m "edit the file"</syntaxhighlight> | ||
可以将存储至暂存区和打 commit 的两个命令进行简化为一行。 | |||
<syntaxhighlight lang="bash"> | |||
git commit -a -m "edit the file" | git commit -a -m "edit the file" | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== commit == | == commit == | ||