Skip to content. | Skip to navigation

Personal tools
Log in
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 under the heading "Make a new repository on GitHub".
    Assume this project has been given the URL "".
  3. If you already have a README file in the project directory, use the github gui to delete the "" 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
    % 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: