Skip to content

Instantly share code, notes, and snippets.

@ericsahit
Created July 9, 2014 07:18
Show Gist options
  • Save ericsahit/fe806e0699a98667d85c to your computer and use it in GitHub Desktop.
Save ericsahit/fe806e0699a98667d85c to your computer and use it in GitHub Desktop.
接下来使用下面的步骤完成“helloworld”版本库的初始化。
本地建立一个Git版本库。
$ mkdir helloworld
$ cd helloworld
$ git init
然后在版本库中添加示例文件,如README.md文件,内容同前。
$ git add README.md
$ git commit -m "README for this project."
为版本库添加名为origin的远程版本库。
$ git remote add origin [email protected]:gotgithub/helloworld.git
执行推送命令,完成GitHub版本库的初始化。注意命令行中的-u参数,在推送成功后自动建立本地分支与远程版本库分支的追踪。
$ git push -u origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment