Today i typed git commit
without the file name i was thinking of, and strange things happened.
usually it would just tell me "use a filename or -a, dummie", but this time it 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 those changes are already appearing on the server! like if i did a push
or merge
!!!
Everything is exactly the same as before despite the file i was trying to commit anyway.
No file was deleted, no file was changed. 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
[...]
That's it. i will just take that i'm not smart enough for git and host this project in Subversion. Do not need much history at this stage anyway, so it can be lost for now.
I may give it another go after i have the time to read the git book entirely.
thanks for trying to help, but this just got too weird and unproductive.
also, out of curiosity to someone, my work flow so far have been (two months doing this and everything was fine until today)
$ git fetch
$ git merge origin/master master
$ edit file
$ git add somenewfile
$ git commit -m 'something changed' file somenewfile
$ git push