Search code examples
xcode4github

Uploading Files to Github from a Local Repo


I have a Xcode 4 project, and when I opened it in the first time I did checked the "create a local respo for the project...". I also have a repo in GitHub. How to upload the files from my computer to the repo in github? Thanks.


Solution

  • http://help.github.com/create-a-repo/

    initialize your local folder as a git repo:

    git init
    

    stage your local files in the repo

    git add .
    

    commit your code to the repo

    git commit -m 'comment'
    

    tell git about your remote repo

    git remote add origin //your github conneciton here
    

    push your local master branch to the "origin" remote repo

    git push origin master