git - Comment lister uniquement les noms des fichiers qui ont changé entre deux commits

Mots clés : gitgit-diffgit-showgit

meilleur 5 Réponses git - Comment lister uniquement les noms des fichiers qui ont changé entre deux commits

vote vote

94

git diff --name-only SHA1 SHA2 
git diff --name-only HEAD~10 HEAD~5 
vote vote

86

git diff --name-status [SHA1 [SHA2]] 
git log --name-status --oneline [SHA1..SHA2] 
vote vote

74

$ git diff --stat HEAD~5 HEAD  .../java/org/apache/calcite/rex/RexSimplify.java   | 50 +++++++++++++++++-----  .../apache/calcite/sql/fun/SqlTrimFunction.java    |  2 +-  .../apache/calcite/sql2rel/SqlToRelConverter.java  | 16 +++++++  .../org/apache/calcite/util/SaffronProperties.java | 19 ++++----  .../org/apache/calcite/test/RexProgramTest.java    | 24 +++++++++++  .../apache/calcite/test/SqlToRelConverterTest.java |  8 ++++  .../apache/calcite/test/SqlToRelConverterTest.xml  | 15 +++++++  pom.xml                                            |  2 +-  .../apache/calcite/adapter/spark/SparkRules.java   |  7 +--  9 files changed, 117 insertions(+), 26 deletions(-) 
$ git diff --numstat HEAD~5 HEAD 40      10      core/src/main/java/org/apache/calcite/rex/RexSimplify.java 1       1       core/src/main/java/org/apache/calcite/sql/fun/SqlTrimFunction.java 16      0       core/src/main/java/org/apache/calcite/sql2rel/SqlToRelConverter.java 8       11      core/src/main/java/org/apache/calcite/util/SaffronProperties.java 24      0       core/src/test/java/org/apache/calcite/test/RexProgramTest.java 8       0       core/src/test/java/org/apache/calcite/test/SqlToRelConverterTest.java 15      0       core/src/test/resources/org/apache/calcite/test/SqlToRelConverterTest.xml 1       1       pom.xml 4       3       spark/src/main/java/org/apache/calcite/adapter/spark/SparkRules.java 
$ git diff --shortstat HEAD~5 HEAD 9 files changed, 117 insertions(+), 26 deletions(-) 
vote vote

63

git diff --name-only `git merge-base origin/master HEAD` 
vote vote

60

git diff --name-status mybranch..myotherbranch 
git diff --name-status mybranch..myotherbranch | grep "A\t" 

Questions similaires