我有一个要获取 git 别名的文件。但是,git 似乎不遵循符号链接。使用以下配置时(其中 ~/.githelpers 是符号链接):
# .gitconfig
[alias]
test = "!source ~/.githelpers && my_function"
...
# in the terminal I get
> git test
-> source ~/.githelpers: 1: source ~/.githelpers: source: not found
-> fatal: While expanding alias 'test': 'source ~/.githelpers': No such file or directory
任何想法如何解决这个问题?
编辑:
使用
[alias]
test = "!source ~/.githelpers && my_function"
结果是
Using source `readlink ~/.githelpers`: 1: source `readlink ~/.githelpers`: source: not found
fatal: While expanding alias 'test': 'source `readlink ~/.githelpers`': No such file or directory
也许这毕竟不是符号链接问题。