使用 Netbeans 的 master 和 origin/master 之间的 Git 差异
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9788959/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Git diff between master and origin/master using Netbeans
提问by ncrocfer
I have a remote repository (origin) and my local repository. How to make a diff between my local master and the origin master please?
我有一个远程存储库(来源)和我的本地存储库。请问如何区分我的本地master和原始master?
In the command line I simply write :
在命令行中,我简单地写:
git diff master origin/master
But I do not know how to do this under netbeans.
但是我不知道在netbeans 下如何做到这一点。
回答by Ben
It will be supported in NB 7.4
NB 7.4 将支持
See http://wiki.netbeans.org/NewAndNoteworthyNB74#Diff_between_revisions_2
见http://wiki.netbeans.org/NewAndNoteworthyNB74#Diff_between_revisions_2
回答by Micha? Tatarynowicz
I think what you really want to do, is to create a new branch, work in it, and when you want to compare to current master (which in your case is origin/master, i.e. the version of master that's on your team's central server, you do a pull (which should work cleanly as there should be no changes in your private working branch, and then compare your branch to master.
我认为您真正想做的是创建一个新分支,在其中工作,以及何时要与当前 master 进行比较(在您的情况下是 origin/master,即您团队中央服务器上的 master 版本,您执行拉取操作(这应该可以正常工作,因为您的私人工作分支中不应有任何更改,然后将您的分支与主分支进行比较。
I have the same problem, being used to CVS and SVN :)
我有同样的问题,习惯了 CVS 和 SVN :)
回答by slash28cu
On Netbeans Right click a file then go to Git->Diff.
在 Netbeans 上右键单击一个文件,然后转到 Git->Diff。
Or also you can right click on the left sidebar on the project, then select Git->Diff.
或者你也可以右键单击项目左侧边栏,然后选择 Git->Diff。
Also each file has button on the top that says History.
每个文件顶部都有按钮,上面写着历史记录。
Hoep this helps.
希望这有帮助。