If I am on a local branch that is not tracking any remote branch and I give the command
git fetch
Given I have several remotes defined
In your project folder, when you initialize git in the first step, .git folder is created.
Look into this folder for a file named config, it contains all the branch info. origin is used as the default.
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:project.git
So the code is fetched from the url listed here.