我要尋找一個解決方案,使提交使用git show <commit>
命令的區別。的Git顯示<commit>並獲得差異的文件集
通常我做:
$> git show 12f00d
和預期的一樣,我得到的所有差異在給定修改的所有文件提交。
現在我有一個很大的提交(許多文件更改/移動)重構後,我只需要知道什麼在此提交中遞歸地更改所有xml
文件。 我有很多.java,.xsl,.properties文件和只有很少的.xml文件。
我嘗試下面的命令沒有成功:
$> git show 12f00d -L 0,0:*.xml
> incorrect syntax
$> git show 12f00d *.xml
> no result
$> git show 12f00d **/*.xml
> Return the root pom.xml but not recursively
$> git show 12f00d **/**.xml
> Return the root pom.xml but not recursively
$> git show 12f00d -- *.xml
> no result
$> git show 12f00d -- **/*.xml
> Return the root pom.xml but not recursively
$> git show 12f00d -- **/**.xml
> Return the root pom.xml but not recursively
我試着用命令git diff <commit>
相同的選項。
我使用GIT中版本1.8.4 Linux下的CentOS(bash的端子)。
你知道,如果這樣的過濾器,可以用git(也許是另一個命令)
你是從版本庫的根目錄或子目錄調用'git的show'? –
我有一個multimodule(maven)項目,我從父項目執行命令。 –