开发者

msysgit multi command alias

I'm trying to put a multi command git alias in my .gitconfig per: YUI Gallery Doc

I'm using git from the msysgit bash shell. Neither of the commands from the doc work for me:

[aliases]
    pu = !"git fetch origin -vn git fetch upstream -vn git merge upstream/master"

gives:

$ git pu
E开发者_高级运维nter passphrase for key '/c/Users/mjhm/.ssh/id_rsa':
fatal: Couldn't find remote ref git

However

[alias]
    pu = !"git fetch origin -v; git fetch upstream -v; git merge upstream/master"

gives:

$ git pu
error: unknown switch `;'
usage: git fetch [<options>] [<repository> [<refspec>...]]
...

How do I get a multi command alias to work in msysgit?


The Yahoo UI documentation seems to use a way of chaining git commands that is different from the one that is documented by git.

By applying that logic, I would use the following line:

pu = ! git fetch origin -v && git fetch upstream -v && git merge upstream/master

(I believe that in the windows version, the "n" should have been a "\n". But that does not work from msysgit bash - maybe that would work from cmd.com)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜