Checkout branch on different remote

Just fetch the refs from the remote (this will fetch all branch, commit, refs etc for the upstream repo)

git fetch upstream

After this, checkout the needed branch (this creates a local copy of the branch)

git checkout -b <branchname> --track upstream/<branchname>

Now if you want to pull the changes in this branch in future, all you need to do is

git pull upstream <branchname>

As mentioned here, try doing an explicit fetch on the branch name:

git fetch upstream master:branch_name

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)