[英]Cygwin's Git command is removing the curly braces from a command. How do I prevent this?
我正在尝试在cygwin中运行此命令:
$ git log --oneline --graph --decorate --all '@{u}..HEAD'
fatal: ambiguous argument '@u..HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions
正如你从错误中看到的那样,它认为我正在传递@u..HEAD
而不是@{u}..HEAD
。 为什么要删除花括号,如何防止这种情况?
我正在使用bash:
$ echo $SHELL
/bin/bash
我认为这可能是执行此操作的git命令,因为如果我只使用echo,花括号会保留:
$ echo '@{u}..HEAD'
@{u}..HEAD
以下是可能有用的其他信息:
$ git version
git version 1.7.9
$ type -a git
git is /c/cygwin/bin/git
$ git config -l
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
core.ignorecase=true
svn-remote.svn.url=https://myrepo/svn/results
svn-remote.svn.fetch=trunk:refs/remotes/trunk
svn-remote.svn.branches=branches/*:refs/remotes/*
svn-remote.svn.tags=tags/*:refs/remotes/tags/*
$ git rev-parse --symbolic-full-name @{u}
fatal: ambiguous argument '@u': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions
@u
此外,如果那些/c
路径让你失望,请注意我的.bashrc文件中包含此行以方便我: mount c: /c
解决方法 :如果我使用此命令而不是git log --oneline --graph --decorate -- '@{u}..HEAD'
它不会抱怨。 注意“ - ”。 但是根据IRC的所有说法,我不应该这样做。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.