git commit -am
相当于git commit -a -m
git commit -a
- Tell the command to automatically stage files that have been modified and deleted, but new files you have not told Git about are not affected.
- 该指令将修改或删除的改动放入暂存区,注意新文件不会放入暂存区;
git commit -m
-
git commit -am "注释内容"
- 将 工作区 以及 暂存区 代码放入 本地仓库(不包括工作区新建的文件)
git add -A
将所有 工作区 代码放入 暂存区(包括新建的文件)
-
git commit -m "注释内容"
- 将 暂存区 代码放入 本地仓库
-
git commit --amend [-m "xxx"] [--no-edit]
- 将 暂存区 内容再次提交到 本地仓库 ,该改动会添加到前一次
commit
中(不产生新的commit
);不带 -m 参数则指令执行完将进入 vi 编辑新commit注释界面;(执行该指令前注意先执行git add -A
) - 不进入vi编辑,直接用原有提交信息, 带上参数:
--no-edit
- 将 暂存区 内容再次提交到 本地仓库 ,该改动会添加到前一次
-
git_status.md 查看当前代码状态指令: 提交代码到本地仓库后, 用我可以查看有多少个commit等待提交到远程哦!
-
git_push.md 提交代码至远程仓库指令:
git commit
后, 接下来就是我git push
出场了!