【发布时间】:2016-10-19 11:56:33
【问题描述】:
我的.gitconfig 文件中有以下代码:
[alias]
john = "!f(){ git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done; git fetch --all; git pull --all; };f"
这基本上是创建一个alias 来拉取远程服务器上的每个分支。但是一直在抛出错误。有人可以帮我理解出了什么问题吗,我尝试过剖析命令,但找不到问题所在。
【问题讨论】:
-
错误是什么?
-
您是否尝试过使用单引号(
'而不是")字符作为命令的外部分隔符?或者转义你的双引号(\"而不是")inside字符串。