Having trouble making new repository from c9 terminal

github

#1

Hi I am trying to make a new GitHub Repository, I am still new to programming and learning these amazing tools.

So Ill start off with explaining what I would like to do and if there is a way to do it. I want to be able to push the projects that I am working on in c9 to my github profile so I can start building my profile. I found that I could make a new repository though GitHubs website, but couldnt figure out how to do it through the terminal in my c9 workspace. is there a way to be able to make a new repository in github through the terminal, or is there a way to link my current workspace to and existing repository, kind of stumped :frowning:


#2

No, there is no way to create GitHub repositories from the terminal using git. Instead, you’ll have to create the repositories on GitHub (make sure not to select any of the options for README or the license, this could create conflicts later on), then click the “Clone or Download” button. Copy the link it shows, then switch to the Cloud9 terminal. Assuming your workspace already had git initialized, run the command git remote add <remote name> <URL you copied>. In most cases, people will call the remote “origin”, but you can call it whatever you want, like maybe “github”. Then, run git push <remote name> <branch name>. You’ll want to push the “master” branch, but you can push anything else, too.