【发布时间】:2019-03-26 21:28:44
【问题描述】:
是否可以这样做:
git add file1 file2 file3 && git commit -m 'blah blah blah'
类似这样的:
git ac file1 file2 file3 -m 'blah blah blah'
我确信可以使用 bash 脚本来完成,但我想知道是否可以通过 git 来创建全局别名。
【问题讨论】:
标签: git
是否可以这样做:
git add file1 file2 file3 && git commit -m 'blah blah blah'
类似这样的:
git ac file1 file2 file3 -m 'blah blah blah'
我确信可以使用 bash 脚本来完成,但我想知道是否可以通过 git 来创建全局别名。
【问题讨论】:
标签: git
可以用普通的旧git commit来完成
git commit -m "here's the comment" file1 file2 file3
顺便说一句,这不是你能做的最好的事情。暂存区是一个非常强大的工具....但事实是提交可以这样使用。
【讨论】:
-a,那么列出您想要添加/提交的文件是没有意义的。 -a 表示“全部”。
git commit -m "here's the comment"。您在索引上的内容将被提交,其他文件将不会包含在修订版中。
git add。快把我逼疯了。