参数我ofter使用下面的命令(GIT)如何设置使用别名
$git commit -am "something message"
设置别名后,不幸的会无法正常工作。
的.gitconfig文件
[alias]
am = "!f(){ git commit -am \"$1\";};f"
然后我想,发生
$ git am "modified something logic"
一些错误。
fatal: could not open 'filepath//modified something logic: No such file or directory
设置别名有什么问题?
谢谢。
你不需要设置别名使用的选项-a和-m。从你的配置文件中删除别名,然后你的命令'git commit -am'什么信息“'应该可以正常工作 –
”设置别名后,不幸的是这样做效果不好。“你得到了什么输出? –
另外'git commit -am'不是你应该需要别名的东西。最好是手动分配必要的文件,然后提交它们,最好使用git commit而不是'git commit -m' – TheGeorgeous