In Eclipse (using Egit) I have my repo set up like this:
I pull from a remote GitHub repo (my lecturer's) at github.com/hallvard/tdt4100-2017 I add files and modify a few of the ones I pull from there. Using Eclipse's egit, I commit changes to my local repo (including all files from the remote pull repo.), and push everything to my own GitHub repo where I then have all of my own files, and my lecturer's files, and my lecturer's modified files. That repo is at github.com/vegarab/tdt4100
Yesterday something weird happened: When pushing to my own repo., it kept saying the master branch was up-to-date, which it was NOT. YES I did stage the files, and they were commited to the local repo.
I tried going to terminal and pushing to remote from there, but no luck.
I headed to my GitHub history and found the last commit, and did a:
git reset commitid
I then tried to push to the remote, but it still said it was up-to-date? EH WHAT? I copied my local repo just to make sure I still had my files if something went wrong: I did a
git pull -f origin master
and it did some changes: My my remote repo is just a fork of the lecturer's repo. All my files are gone, except they are still there in the local repo. Trying to push them gives yet another up-to-date, except the remote now misses hunders of my own commits, and hundreds of files and folders.
What do???