Reputation: 3493
I've git pull
ed from a remote repository, and I think it worked, but at one point I deleted a couple of files and now I want them back. The thing is, I have a feeling git thinks they're already there, because it gives a list of files with 'D' on the right of them. these are the files I need to download, but they're just not there in the folder!
How can I simply download all the files? On bit bucket, it lists all the files perfectly. I just want to download these files.
Upvotes: 0
Views: 7675
Reputation: 4794
The files should still be in your local copy of the repo. Git pull isn't going to get them for you because you still have them.
Assuming you committed their deletion, "git checkout" those files from an earlier version of the repo.
However, since you say it lists them with a 'd' next to them, I assume you haven't, which means you simply need to checkout the deleted files again. For specific files, typing git checkout -- [filename]
will do that for you. It checks out the specific file from the current index.
If you want to do undo all your changes, you can $ git reset --hard HEAD
, although that will also get rid of any other changes you've made in addition to the file deletion.
Upvotes: 3
Reputation: 9520
Just try with git checkout with the tag name or repo sync
Upvotes: 0