1

every time I have to push my branch to remote on GitHub I have to run the following command,

git push --set-upstream sensorAtHome WIP 

however at office I just go ahead and push to our company cgit server.

so what is different and what do I need to do, locally for my GitHub project I have a already done this:

git remote add <name> <url> 

I thought that was enough .

secondly what <name> refers to name of branch or name of repository?

1
  • <name> is the name of the remote. It's the name you're gonna use to refer to that <url>. sensorAtHome is a remote name. As for the rest of your problem, git push --set-upstream should do it. Could you show the full text of what happens when you run that command? Also the content of .git/config in that repository. Commented Jan 26, 2017 at 5:38

1 Answer 1

1

Check your git branch -avv output, as well as git remote -v

Your office branch is probably already linked to a remote tracking branch.

See "Why do I need to explicitly push a new branch?"

You should push once with:

git push -u sensorAtHome WIP 

Then a simple git push would be enough: your local branch would know where and to which branch to push ("where" is sensorAtHome remote url, and "which branch" is sensorAtHome/WIP)

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.