扫码关注官方订阅号
麻烦解答下 git commit -m 与 git commit -am 的区别
git commit -am "str" #等同于 git commit -a -m "str"
我们运行下
man git commit
来获取a参数的意义即知区别了。
a
OPTIONS -a, --allTell 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的时候都是
git add . git commit -m "some str" git push
这三大步,而实际上,你只需要两条命令就够了,除非有新的文件要被添加进去。
git commit -am "some str" git push
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
我们运行下
来获取
a参数的意义即知区别了。意思是说
拓展
通常我们提交git的时候都是
这三大步,而实际上,你只需要两条命令就够了,除非有新的文件要被添加进去。