I have a GIT repository and inside several SUBMODULES.
The problem is every time someone updates submodule, I try to update my files by calling:
$ git submodule update
But what happens is it deletes all my uncommited files which is very annoying.
I tried to commit and push the files first but it doesn't let me push:
error: failed to push some refs to 'ssh://dev.ancreative.co.uk/var/git/library/Blocks.git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes before pushing again. See the 'non-fast-forward'
section of 'git push --help' for details.*
So I try to call git submodule update
, but then this deletion happens.
Anyone has any idea what can cause this problem? Thanks a lot.