Search code examples
gitsmartgit

Smartgit not seeing old files added back after reset


Yesterday i did some deleting and removed too much (ye i know typical case). Upon reading blogs about smartgit i resetted to the revision where i left off before all the deletes. I got my old files back but git does not detect them being there so i'm unable to push them to my server again. Any ideas? I tried looking in gitignore file and in the excludes in the info folder but nothing is there -edit- i already tried a force push.

The steps I used are

- Going to logs
- Select the revision
- Press ctr+R (reset)
- Selected hard reset and confirmed

Solution

  • I needed to force pulling all the files back to my server, i found a stackoverflow post for this:

    How do I force git pull to overwrite everything on every pull?

    And what i did was:

    git fetch origin master
    git reset --hard FETCH_HEAD
    git clean -df
    

    Added the code for future reference