I am trying to figure out how a file somehow disappeared from a project so I ran this command:
git log -- .eslintrc.json
which returned nothing. So I figured maybe I didn't commit it when I thought I did.
I then ran this command to confirm:
git diff commit_where_i_added_it^ commit_where_i_added_it
This returned:
diff --git a/.eslintrc.json b/.eslintrc.json
new file mode 100644
index 0000000..92a588d
--- /dev/null
+++ b/.eslintrc.json
@@ -0,0 +1,18 @@
+{
+    "env": {
+        "browser": true,
+        "es6": true,
+        "node": true
+    },
+    "extends": "google",
+    "globals": {
+        "Atomics": "readonly",
+        "SharedArrayBuffer": "readonly"
+    },
+    "parserOptions": {
+        "ecmaVersion": 2018,
+        "sourceType": "module"
+    },
+    "rules": {
+    }
+}
.
.
.
So clearly the file exists in git. My question is this then: How can git log -- .eslintrc.json not return anything when the file exists in a certain commit? Am I misunderstanding the command? I have used it on other files and it works as expected.
P.S all of the above is happening on the same branch. The commit where I added the file exists on the branch I am running this command
