I want to know the commit when a specific submodule was added, in other words I want to know the commit where .gitmodules file is modified to add the following
[submodule "submodule1"]
path = submodule1
url = git@bitbucket.org:{user}/submodule1.git
I used the following to get the all commits for .gitmodules
$ git log -p --follow .gitmodules
commit commit#
Author: auther
Date: Date
Description
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..84a18f8
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "submodule1"]
+ path = submodule1
+ url = git@bitbucket.org:{user}/submodule1.git
in this case there is only one commit, but if there is other commits that is adding/deleting other submodules, how can i filter the commits to get the only the commit in which submodule1 was added
Thanks