How to create a repo from remote

How to create a repo from remote

There are few steps we should take to create a new repo and make progress:


step 1. Use github API to create a new repo:

curl -u 'USER' https://api.github.com/user/repos -d '{"name":"PROJECT_NAME", "description":"THIS IS A PROJECT."}'


step 2. Git init to initialize the local project files.

git init

git remote add origin THE_REPO_URI

THE_REPO_URIcan be one of following two forms:

ssh form: git@github.com:USER/projectname.git

https form: https://github.com/USER/projectname.git


step 3. First commit:

git add .

git commit -a 'first commit.'


step 4. First push.

git push --set-upstream origin master


Done.

Be productive and make project progress!

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • Lesson 3: Using GitHub to Collaborate 3.1 Creating a GitH...
    赤乐君阅读 6,186评论 3 11
  • 因为原文太长超出字数,Lesson 3 就放在另一篇文章里 How to Use Git and GitHub 标...
    赤乐君阅读 5,331评论 1 5
  • 今天是423世界读书日,从前几天开始,一些书店和购书网站已经开始了热火朝天的促销活动,看来大家对读书的意识也提高了...
    绽蕊向阳阅读 157评论 0 1
  • #丑小鸭真的会变成白天鹅吗# 妈妈说, 不管长大后会不会变成白天鹅,你都要努力的挥动翅膀,因为,只有这样,在未来的...
    没有故事的井阅读 117评论 0 0
  • 偶然看见你剪去了长发 我想一定是为了他 曾幻想你穿着美丽的婚纱 现在想想都是一些玩笑的话 内心的伤药不需你再为我涂...
    早睡先生阅读 281评论 0 2