I am attempting to follow some steps to contribute to a repository on GitHub and one of the steps is not working. The steps are here: https://github.com/wdbm/qTox/blob/master/CONTRIBUTING.md#how-to-open-a-pull-request.
I fork the repository on GitHub.
I clone the repository:
git clone https://github.com/<YOUR_USER>/qTox.git
I access the directory of the local repository:
cd qTox
I add the upstream remote in order to be able to fetch from the upstream repository:
git remote add upstream https://github.com/qTox/qTox.git
I attempt to point the local master branch to the upstream repository:
git branch master --set-upstream-to=upstream/master
This command fails with the following error message:
error: the requested upstream branch 'upstream/master' does not exist
hint:
hint: If you are planning on basing your work on an upstream
hint: branch that already exists at the remote, you may need to
hint: run "git fetch" to retrieve it.
hint:
hint: If you are planning to push out a new local branch that
hint: will track its remote counterpart, you may want to use
hint: "git push -u" to set the upstream config as you push.
How should I address this error? I am using Git 2.9.3.
git fetch
, but I still get the same error when I rungit branch master --set-upstream-to=upstream/master
. I am attempting to following the steps described here.git fetch upstream master:master
) I get the error message "fatal: Refusing to fetch into current branch refs/heads/master of non-bare repository" which does not sound right.