I have local project for which i created remote github repo. I didn't often push my local changes to remote repo but sometimes doing it. Recently while i was working on local project i have deleted some files using
rm fileName After deleting i want to restore them and easiest way i think about was retrieving deleted files from github repo I have only one master branch in my repo and i tried
git fetch And console prompt me that all files up to date after checking files which i need i didnt find them. After it i tried
git pull and also i got notification that all files up to date and files which i need didnt uploaded to my local repo. I thought that maybe those files which i need haven't in remote repo but after checking i found them there. What i am doing wrong ?? How i should retrieve nedeed files ??
git statusshow them as deleted? If so just dogit checkout master -- fileName. This resets the file to how it was at last commit, no pulling needed as you have a local copy of the whole repo already.