I'm new to GitHub, but I read every possible help section and many StackOverflow posts and I still don't have the answer I'm looking for. (Btw I removed the https:// in front of the links because of lack of rep points, but in the original they are present).
There is the repository I want to sync my files with - github.com/Something/project.git
I forked it. Then I cloned my fork to my computer using Git Bash:
git clone github.com/MY_USERNAME/project.git
I opened the folder:
cd project/
I added as a second remote the repository:
git remote add upstream github.com/Something/project.git
I downloaded its files:
git fetch upstream
Now I have:
git remote -v
origin github.com/MY_USERNAME/project.git (fetch)
origin github.com/MY_USERNAME/project.git (push)
upstream github.com/Something/project.git (fetch)
upstream github.com/Something/project.git (push)
And here comes the problem. Let's say I deleted some files from my computer and from my fork. And the main repository doesn't have new updates meanwhile. I try to download original files again and to update my fork using:
git fetch upstream master
git merge upstream/master
But NOTHING updates. I get only Allready up-to-date all the time!!! I tried many different "ways" including pull. I tried to "change" the branch with checkout, but I don't have any others, so nothing happens again. There is only one branch in the original repository and only one in mine, so it's not the problem. Btw I push my files to the fork without any problem!
So the question is: What does it mean to sync the fork, when it doesn't even download. Is it possible to directly update my fork, without having to update first my local files and then upload to my fork?
It won't update because you already have every commit from upstream in your history. If you deleted some files and committed the changes that means you are ahead.