git - Comment comparer les fichiers de deux branches différentes

Mots clés : gitgit-diffgit

meilleur 4 Réponses git - Comment comparer les fichiers de deux branches différentes

vote vote

95

git diff mybranch master -- myfile.cs 
git diff mybranch..master -- myfile.cs 
vote vote

86

git diff ..master path/to/file 
vote vote

75

git diff branch1name branch2name path/to/file 
git diff mybranch/myfile.cs mysecondbranch/myfile.cs 
 git diff branch1:file branch2:file 
 git diff mybranch:myfile.cs mysecondbranch:myfile.cs 
git diff ..someBranch path/to/file 
git diff ..master myfile.cs 
vote vote

61

git diff $BRANCH -- path/to/file 

Questions similaires