如何使用git bash在Github上创建新的回购? [英] How to create a new repo at Github using git bash?

查看:161
本文介绍了如何使用git bash在Github上创建新的回购?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用git bash从我的机器创建新的存储库?



我遵循以下步骤:

  mkdir〜/ Hello-世界

cd〜/ Hello-World

git init

touch自述文件

git add自述文件

git commit -m'第一次提交'

git remote add origin https://github.com/username/Hello-World.git

git push origin master

但是我收到了致命错误:您是否在服务器上运行update-server-info ?

解决方案

您无法使用git bash在github上创建回购。 Git和github是不同的东西。 Github是一个平台,让您在代码上进行托管和协作,而git是使用的版本控制工具。你可以在维基百科文章中阅读更多关于它们的信息: github git 然而,如果您的目的是创建一个github repo使用终端,你可以使用github api和curl来完成。


How can I create a new repository from my machine using git bash?

I followed the below steps:

mkdir ~/Hello-World

cd ~/Hello-World

git init

touch README

git add README

git commit -m 'first commit'

git remote add origin https://github.com/username/Hello-World.git

git push origin master

But I'm getting "Fatal error: did you run update-server-info on the server? "

解决方案

You cannot create a repo on github using git bash. Git and github are different things. Github is a platform that let's you host and collaborate on code while git is the version control tool used. You can read more about them on wikipedia articles: github and git.

However if your intention is to create a github repo using terminal, you can do it using the github api and curl.

这篇关于如何使用git bash在Github上创建新的回购?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆