vico vico - 1 year ago 160
Git Question

Push local branch to remote

I have created local branch:

git checkout -b tmp1

Now I would like to push this branch to server:

git push remote_tmp1 tmp1

Got error:

fatal: 'remote_tmp1' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

How to push my branch to server?

Answer Source

You are getting that specific error because you have not added remote_tmp1 as a remote repository.

Add the remote repository first and then retry pushing: git remote add remote_tmp1 git push --set-upstream remote_tmp1 tmp1

You can add the remote using https as above or with ssh if available. For example if you're using Github you can use either: or

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download