i deleted a commit file from working repo but the file is available in local repo in GIT and file is not available in remote repo as well.
now my question is how we can get that deleted file that is available in local repo but not in work repo.
Repo =repository
Thanks
If the file is stored in a previours commit in the history of the repo, restoring it to its value in that previous commit is a simple:
git checkout <commit sha1> -- path/to/file
The "zone" where files are added before being committed is called: the index.
If you want to get a file back from the index:
git checkout -- path/to/file
Simple steps:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.