如何在 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
Run Code Online (Sandbox Code Playgroud)
但它们都不起作用。
那么有没有人可以解决我的问题?谢谢!
单程 。. .
git commit -F filename
Run Code Online (Sandbox Code Playgroud)
见https://git-scm.com/docs/git-commit