如何在Git中使用文件作为提交消息?

如何在 Git 中使用文件作为提交消息?

我在文件中写入我的消息message,并且我想在执行时将其用作提交消息git commit -a

我试过:

$ git commit -a -m | cat message
$ cat message | git commit -a -m
$ git commit -a --message=`cat message`
$ cat message > git commit -a -m
$ cat message | git commit -a -m

但它们都不起作用。

那么有没有人可以解决我的问题?谢谢!

回答

单程 。. .

git commit -F filename

见https://git-scm.com/docs/git-commit


以上是如何在Git中使用文件作为提交消息?的全部内容。
THE END
分享
二维码
< <上一篇
下一篇>>