Git commit without file name and without -a

Today I typed git commitwithout a file name, which I was thinking about, and strange things happened.

he usually just tells me "use the file name or -a, dummie", but this time he showed:

$ git commit -m "some change"
[master 1d75411] some change
 37 files changed, 1566 insertions(+), 1189 deletions(-)
 create mode 100644 fileA
 create mode 100644 fileb
 [...]
 delete mode 100644 fileC
 delete mode 100644 fileD
 [...]

and these changes are already appearing on the server ! For example, if I did pushor merge!!!

Everything is exactly the same as before, despite the file that I tried to commit in any case.

Not a single file was deleted, the file was not modified. Unix permissions are the same as before!

What happened?!


Edit: now, after every two commits, this happens:

$ git status
 * nothing changed *
$ git diff
 * nothing *
$ edit somefile
$ git commit -m "some change" somefile
[master f875c5b] some change
 21 files changed, 4 insertions(+), 1563 deletions(-)
 delete mode 100644 fileA
 delete mode 100644 fileB
 delete mode 100644 fileC
 [...] (somefile does not even appear on the console output, only if i get log later)

$ git status
# On branch master
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#   new file:   fileA
#   new file:   fileB
#   new file:   fileC
[...]

$ git commit -m "re-add files? why?"
$ git push

$ git status
 * nothing changed *

$ git diff
 * nothing *

$ edit somefile

$ git commit -m "some change" somefile
[master f875c5b] some change
 21 files changed, 4 insertions(+), 1563 deletions(-)
 delete mode 100644 fileA
 delete mode 100644 fileB
 delete mode 100644 fileC
 [...]

$ git status
# On branch master
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#   new file:   fileA
#   new file:   fileB
#   new file:   fileC
[...]

. , git Subversion. , .

, git.

, .

, -, ( , )

$ git fetch
$ git merge origin/master master
$ edit file
$ git add somenewfile
$ git commit -m 'something changed' file somenewfile
$ git push
+2
2

, , .

- .

devs, , , , , , , ... , git .

+1
0

All Articles