I have lost all project data in git from all branches and I'm unable to recover it.
I created three branches: 'master'
, 'distribution'
and 'remoteerp'
(All with same code and just backup) and checked-out to remoteerp
, then I configured the sparse checkout config as true and updated /.git/info/sparse-checkout
file to /inoERP/inoerp/www/
and /inoERP/inerp/inoerp-server
. Then, I pulled my fork-project from github like this:
git remote add -f githubinoerp [github_url_to_my_fork_repo]
git pull githubinoerp master
Which caused conflicts in License.txt and Copyright.txt and showed only these files in working directory. As I'm not able to resolve merge-conflicts (I am still studying git as beginner), I just tried to reset to old state using git reset --hard
however it changed nothing accept saying something like sparse-checkout has changed your working directory
. Checking out to other branches (like distribution and master) subsequently is also not showing the original files. i have tried git reset Head -- hard and git reset --hard on (after checking out) all branches but no use.
how can i recover my project to older state?