标签:
1.Create a new repository on GitHub.
2.Open Terminal (for Mac users) or the command prompt (for Windows and Linux users).
3.Change the current working directory to your local project.
4.Initialize the local directory as a Git repository.
$ git init
5.Add the files in your new local repository. This stages them for the first commit.
$ git add .
6.Commit the files that you‘ve staged in your local repository.
$ git commit -m ‘first commit‘
7.At the top of your GitHub repository‘s Quick Setup page, click to copy the remote repository URL.
8.In Terminal, add the URL for the remote repository where your local repository will be pushed.
$git remote add origin <your URL>
$git remote -v
9.Push the changes in your local repository to GitHub.
$ git pull origin master
$ git push origin master
How to adding an existing project to Github
标签:
原文地址:http://www.cnblogs.com/ArielLiang/p/4693446.html