码迷,mamicode.com
首页 > 其他好文 > 详细

How to adding an existing project to Github

时间:2015-08-01 01:02:49      阅读:111      评论:0      收藏:0      [点我收藏+]

标签:

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!