Compare foo.bar from two different branches in MAGIT

蓝咒 提交于 2019-12-21 07:04:52

问题


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).



来源:https://stackoverflow.com/questions/16358936/compare-foo-bar-from-two-different-branches-in-magit

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!