2017-10-20 31 views

回答

0

这不像听起来那么简单。

如果已设置:

excludesFile = ~/.config/git/ignore 

然后你的manually expanding the ~ character的问题,这是不那么容易,因为你的希望。

以下别名会做的魔力为你:

edit-global-excludes = !"bash -c 'f=$(git config core.excludesFile); \"$EDITOR\" \"${f/#\\~/$HOME}\"' #" 

这相当于在shell提示下键入:

$ bash -c 'f=$(git config core.excludesFile); "$EDITOR" "${f/#\~/$HOME}"' #