从本地终端创建Github存储库

sri*_*vas -5 git github

如何从本地终端创建Github存储库?

更新:

我们必须创建存储库并将数据从一个应用程序上传到github,而不是在应用程序系统中存储任何数据......这是可能的

实际上,许多用户将登录此应用程序.他们将在预览框中输入代码并检查结果.这里用户能够将此代码存储到github中.

gue*_*rda 7

您不创建 Github 存储库,而是创建 Git 存储库。然后可以将其与 Github 一起用作遥控器。如果您在 Github 上创建了存储库,则可以使用以下命令将本地存储库与 Github 远程连接:

$ mkdir ~/Hello-World
# Creates a directory for your project called "Hello-World" in your user directory

$ cd ~/Hello-World
# Changes the current working directory to your newly created directory

$ git init# Sets up the necessary Git files
# Initialized empty Git repository in /Users/you/Hello-World/.git/


$ git remote add origin https://github.com/username/Hello-World.git
# Creates a remote named "origin" pointing at your GitHub repository

$ git push origin master
# Sends your commits in the "master" branch to GitHub
Run Code Online (Sandbox Code Playgroud)

来自: https: //help.github.com/articles/create-a-repo