msysgit 多命令别名
我试图在我的 .gitconfig 中添加一个多命令 git 别名: YUI Gallery Doc
我从 msysgit bash shell 使用 git。文档中的两个命令都不适合我:
[aliases]
pu = !"git fetch origin -vn git fetch upstream -vn git merge upstream/master"
给出:
$ git pu
Enter passphrase for key '/c/Users/mjhm/.ssh/id_rsa':
fatal: Couldn't find remote ref git
但是
[alias]
pu = !"git fetch origin -v; git fetch upstream -v; git merge upstream/master"
给出:
$ git pu
error: unknown switch `;'
usage: git fetch [<options>] [<repository> [<refspec>...]]
...
如何获得在 msysgit 中工作的多命令别名?
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
Enter 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Yahoo UI 文档似乎使用了一种链接 git 命令的方式,该方式不同于 由 git 记录。
通过应用该逻辑,我将使用以下行:(
我相信在 Windows 版本中,“n”应该是“\n”。但这在 msysgit bash 中不起作用 - 也许这在 cmd 中起作用。 com)
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:
(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)