This answer shows how to see the differences between a specific file foo.bar
in two different branches in git
. My question is how to do this within magit
?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
I use magit to complement vc
. vc
already has this functionality C-u C-x v =
回答2:
Just wanted to note that this is now directly possible with magit
.
In the Magit status buffer, type d
to open up the diff popup.
Then limit the diff to your file of interest with =f
and the file name.
Finally, do a diff range r
and type in the branch that you want to compare to (one can also type in a specific commit on the same branch, see a similar question).