【发布时间】:2016-12-28 23:48:14
【问题描述】:
我有一个文件存在于 branch_A 但不存在于 branch_B。
我想跑步
> git checkout branch_B
> git blame branch_A file
但是,git 抱怨我在本地没有该文件 - 这是正确的,但忽略了我想归咎于 branch_A 的事实。我希望 git blame 能够检查相对于所需分支而不是签出分支的文件是否存在。
如果我在分支 B 上运行它,我可以欺骗 git blame 做我想做的事:
> touch file
> git blame branch_A file
有没有一种简单的方法可以做到这一点?
【问题讨论】: