简体   繁体   English

Git diff分支-通过扩展过滤?

[英]Git diff branch - filter by extension?

I'm diffing 2 branches with git diff master..branch2 and diff shows me html, css, php files, etc. I'd like to only view php files here, but git diff master..branch2 -- '*.php' returns nothing. 我用git diff master..branch2和diff向我展示了两个分支,diff向我展示了html,css,php文件等。我只想在这里查看php文件,但是git diff master..branch2 -- '*.php'返回任何内容。 How do I actually filter it? 我实际上如何过滤它?

Yeah this was an issue with the version of git - Centos 6.5 has 1.7.1 in current yum. 是的,这是git版本的问题-Centos 6.5当前的yum中有1.7.1。 I've updated it to 1.9.4 manually and it all worked! 我已经手动将其更新为1.9.4,并且一切正常!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM