Skip to content. | Skip to navigation

Personal tools
Log in
Sections
You are here: Home How To github New Github Repository

New Github Repository

How to set up a new github repository the easy way.

 

These instructions assume you already have a lot of code and you want to make a github repository out of it.

  1. Structure your project in a single folder as you would like it structured on github.
  2. Follow the instructions at https://help.github.com/articles/create-a-repo under the heading "Make a new repository on GitHub".
    Assume this project has been given the URL "https://github.com/username/project".
  3. If you already have a README file in the project directory, use the github gui to delete the "README.md" file created in the previous step.
  4. In a shell, go to your project directory and issue the following commands, adjusting the names "project" and "username" accordingly (note that the "%" is the prompt):
  5. % git init
    % git add .
    % git commit -m 'project: setting up the git repository for project"
    % git remote add origin https://github.com/username/project.git
    % git push -u origin master

 

Once done, it is possible to permanently skip manual password authentication using OS X Keychain, for example.

git config --global credential.helper osxkeychain

For windows or other platforms see: http://stackoverflow.com/questions/5343068/is-there-a-way-to-skip-password-typing-when-using-https-github