我无法将本地主服务器(与origin / master在同一提交中)与production / master进行比较。
$ git remote -v
origin git@github.com:mydomain/mydomain.git (fetch)
origin git@github.com:mydomain/mydomain.git (push)
production git@heroku.com:mydomain-production.git (fetch)
production git@heroku.com:mydomain-production.git (push)
staging git@heroku.com:mydomain-staging.git (fetch)
staging git@heroku.com:mydomain-staging.git (push)
我似乎能够通过staging/master
获得差异,但我在production/master
时遇到错误:
$ git diff staging/master
[i'm shown diff]
$ git diff production/master
fatal: ambiguous argument 'production/master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
任何人都能看到我搞砸了什么?
我真正想要做的是看到本地主人的提交不是那些与git diff production/master...master
之类的其他遥控器上的提交但是同样的错误:
$ git diff production/master...master
fatal: ambiguous argument 'production/master...master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
答案 0 :(得分:-1)
我过去使用的是
git fetch production master && git diff master production/master
您之前可能从未从该遥控器中取出。
在查看production/master
上但未在本地master
上提交的提交方面,git log
可能更合适:
git log --oneline production/master..master