使用命令行将项目上传到GitHub [英] Uploading a project to GitHub using the command line

查看:146
本文介绍了使用命令行将项目上传到GitHub的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何通过命令行将项目上传到GitHub?我已经在Windows上安装了Git.我正在通过创建新的存储库来上传项目,但是没有通过命令行上传.

How do I upload a project to GitHub through the command line? I have installed Git on Windows. I am uploading my project by creating a new repository, but it did not upload by command line.

推荐答案

步骤1:

此处

第2步:

github

第3步:

转到您的项目文件夹

第4步

打开git bash或cmd并通过键入git init

open git bash or cmd and initialize your project by typing git init

第5步

通过键入git add .来添加所有文件来添加文件

add files by typing git add . for adding all file

第6步

通过键入git commit -m 'your message'

步骤7

通过键入从github复制您的远程位置

copy your remote location from github by typing

git remote add origin 'your repository link'

步骤8

通过输入git push -u origin master

这就是您需要做的所有事情.或查看github 文档.

and thats all you need to do. Or check github documentation.

这篇关于使用命令行将项目上传到GitHub的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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