我对Arcanist和git都比较新。我希望能够创建一个针对当前检出/工作中的git分支(我有一个本地未推送的提交)而不是主分支的arc diff(使用Arcanist的Phabricator Differential实例)。对我来说,arc文档并不清楚。这种情况是否可能?如何操作?如果答案也适用于2-3个本地未推送的提交,则更好。
此外,“arc help diff”给出:
diff [paths] (svn)
diff [commit] (git, hg)
Supports: git, svn, hg
Generate a Differential diff or revision from local changes.
Under git, you can specify a commit (like HEAD^^^ or master)
and Differential will generate a diff against the merge base of that
commit and HEAD.
也许我只需要执行“arc diff [commit]”,其中[commit]是目标分支的最新提交?但我想要确定一下,因为我不想污染我们的Phabricator实例。此外,如果答案能够解释如何正确操作,我也很乐意接受“你做错了”的回答。
arc diff --base 'git:branch-unique(origin/master)'
命令,该命令会生成与origin/master
顶端的差异。运行arc diff --preview --base git:<branch>
命令并未得到我想要的结果。 - davidtingsuarc diff origin/<branch>
这个对我有用,谢谢。 - Zain Zafar