This is what happened:
1)I forked a repository
2)I cloned the forked repo to my laptop
3)I added some files of my own
4)I accidentally deleted a file (which was among the files from the original repo)
5)Commited and pushed the changes (I think I ran into some issues here, somehow fixed it). So at this point neither the online repo nor the offline one in my laptop had the file I accidentally deleted. Only the original repo I forked has it.
Now I want to get that file back. Doing a git pull
on the original repo just tells me mine is up to date. How can I do this?
I saw some answers that use git checkout
and git rebase
but I just got confused (I'm fairly new to using git). Also after spending a few hours debugging code I really don't want to "debug" git commands. -_-
So please provide a solution and a simple explanation to it.