Register    Login    Forum    Search    FAQ

Board index » Everything




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Github Help [solved]
 Post Posted: September 1st, 2017, 10:53 pm 
 

Joined: September 1st, 2017, 10:46 pm
Posts: 11
Location: Mississippi, USA
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.

Top 
 Profile  
Reply with quote  
 Post subject: Re: Github Help
 Post Posted: September 1st, 2017, 11:36 pm 
 

Joined: September 1st, 2017, 10:46 pm
Posts: 11
Location: Mississippi, USA
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:
cd C:\Users\username\source\repos\repositoryfolder

then typed in
Code:
git checkout branchname
git push -u githuburl


Top 
 Profile  
Reply with quote  
 Post subject: Re: Github Help
 Post Posted: September 2nd, 2017, 3:57 am 
Site Admin
User avatar

Joined: December 31st, 2011, 4:53 pm
Posts: 3387
Location: Japan
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


Top 
 Profile  
Reply with quote  
 Post subject: Re: Github Help
 Post Posted: September 2nd, 2017, 4:07 am 
 

Joined: September 1st, 2017, 10:46 pm
Posts: 11
Location: Mississippi, USA
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


Top 
 Profile  
Reply with quote  
 Post subject: Re: Github Help
 Post Posted: September 2nd, 2017, 8:10 am 
Site Admin
User avatar

Joined: December 31st, 2011, 4:53 pm
Posts: 3387
Location: Japan
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


Top 
 Profile  
Reply with quote  
 Post subject: Re: Github Help
 Post Posted: September 2nd, 2017, 6:22 pm 
 

Joined: February 28th, 2013, 3:23 am
Posts: 2708
Location: Oklahoma, United States
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


Top 
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 6 posts ] 

Board index » Everything


 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for: