I asked git to show me all the commits that modified a certain file, and it produced what I asked, except some commits show no modification to said file (and so instead only the commit hash/author/message etc… appears). It seems that most of these commits are merges. What could be the meaning of this ?
Command : git log -p -- <path/to/file>
commit <hashM>
Merge: <hash1> <hash2>
Author: Name <Email>
Date: <Date>
Merged with develop.
commit <hashC>
Author: <Name> <Email>
Date: <Date>
Modified file to add new header.
diff --git a/<path/to/file.cpp> b/<path/to/file.cpp>
index ece9ea6fc..370c23a50 100644
--- a/<path/to/file.cpp>
+++ b/<path/to/file.cpp>
@@ -1,6 +1,12 @@
#include "Header.h"
+#include "NewHeader.h"
#include "StandardHeader.h"
#include "OtherHeader.h"
Here commit hashM
is weird to me, because it appears as an output of the command, yet shows no modification to the file. hashC
on the other hand is not strange : it has modifications to the file.
1