Github Help [solved]

The Partridge Family were neither partridges nor a family. Discuss.
Post Reply
jamesmfox
Posts: 15
Joined: September 1st, 2017, 10:46 pm
Location: Mississippi, USA

Github Help [solved]

Post by jamesmfox » September 1st, 2017, 10:53 pm

I just starting out coding. I've gotten through tutorial 14 making the snek game. I am trying to get started with github, but when i clone from planet chili github. I cant get visual studios 17 to publish new branch to mygithub.. I only have option to push and when i try that it says "Branch 'SnekGame' does not exist in the repository. Can anyone help please?
Last edited by jamesmfox on September 3rd, 2017, 12:29 am, edited 2 times in total.

jamesmfox
Posts: 15
Joined: September 1st, 2017, 10:46 pm
Location: Mississippi, USA

Re: Github Help

Post by jamesmfox » September 1st, 2017, 11:36 pm

Figured it out:
after creating a branch in Visual Studios and adding a remote in repository settings
I had to open up cmd and "cd" into the repository folder

Code: Select all

cd C:\Users\username\source\repos\repositoryfolder
then typed in

Code: Select all

git checkout branchname
git push -u githuburl

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: Github Help

Post by chili » September 2nd, 2017, 3:57 am

Good job mate! It seems that Visual Studio has changed how the push command works in 2017, and you can no long push a single branch to a specific repo without publishing it there first, but there also seems to be no way (from inside VS) to publish a branch to a specific repo when you are tracking multiple (and not just origin).

ON the bright side, good intro to git command line ;)
Chili

jamesmfox
Posts: 15
Joined: September 1st, 2017, 10:46 pm
Location: Mississippi, USA

Re: Github Help

Post by jamesmfox » September 2nd, 2017, 4:07 am

Thanks! Still wouldn't push even after git command line..
Kept saying remote doesn't have a branch by that name..
I just created a new repo on github and imported from planetchili..
then branched of from there.. Seems to be working with visual studios now..

https://github.com/JamesMFox/SnekGame/tree/Obstacles

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: Github Help

Post by chili » September 2nd, 2017, 8:10 am

yeah, in truth the situation of having 2 remotes isn't that common. either you fork on github and then pull from your fork, or you pull from an account, change origin to your own repo, and then push.
Chili

albinopapa
Posts: 4373
Joined: February 28th, 2013, 3:23 am
Location: Oklahoma, United States

Re: Github Help

Post by albinopapa » September 2nd, 2017, 6:22 pm

The easiest by far in my opinion is to fork someones repo into your account and then click Open In Visual Studio from GitHub
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com

Post Reply