My Git status is showing all files deleted
in my working tree which is incorrect, they are still there.
To resolve it, I should execute git reset --hard
which reset all my modifications to other files.
Any idea how to solve it or how did it happen?
git status
output:
On branch develop
Your branch is behind 'origin/develop' by 15 commits, and can be fast-forwarded.
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
deleted: .gitignore
deleted: v3/.gitignore
deleted: v3/index-test.php
deleted: v3/index.php
deleted: v3/protected/.gitignore
deleted: v3/protected/.htaccess
deleted: v3/protected/Gruntfile.js
Edit: The above is not the complete git status
output.
Those files that I was working on are not staged for deletion.
git status
output to the question. – Freeheartedgit status
output, or did you snip it? The reason I ask is because you say you have modifications to other files, and from yourgit status
output, it doesn't appear that way. – Merthiolate