0

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

結局、シンボリックリンクの問題ではないかもしれません。

4

1 に答える 1

1

sourcegit検索して実行できるプログラムではありません。代替については、これを参照してください。

于 2012-09-20T20:55:45.233 に答える