如何在GitHub上传项目

简介: 如何在GitHub上传项目

首先在GitHub官网上注册一个账号

https://github.com

步骤

第一步:点击start a project

第二步:给你的本地仓库起名,填写描述,选择公开还是私有,创建仓库

第三步:保留你仓库的地址:https://github.com/stefan-jie/vueFrame.git(很重要!)

第四步:在你要上传的项目目录下右击,git bash here

第五步:依次输入如下命令

1.git初始化

$ git init

2.提交

$ git commit -m "第一次提交框架"

3.绑定远程仓库

$ git remote add origin https://github.com/stefan-jie/vueFrame.git

4.开始上传

$ git push -u origin master

接下来会弹框,输入账号密码login即可

如下为整个上传过程


Alan@JIE MINGW64 /e/框架/前端/frame (master)
$ git init
Initialized empty Git repository in E:/框架/前端/frame/.git/

Alan@JIE MINGW64 /e/框架/前端/frame (master)
$ git add .
warning: LF will be replaced by CRLF in .gitignore.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in README.md.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in babel.config.js.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in package-lock.json.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in package.json.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in public/index.html.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/App.vue.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/components/HelloWorld.vue.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/router/index.js.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/store/index.js.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/views/About.vue.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/views/Home.vue.
The file will have its original line endings in your working directory

Alan@JIE MINGW64 /e/框架/前端/frame (master)
$ git commit -m "第一次提交框架"
[master (root-commit) f0b3f85] 第一次提交框架
 16 files changed, 11901 insertions(+)
 create mode 100644 .gitignore
 create mode 100644 README.md
 create mode 100644 babel.config.js
 create mode 100644 package-lock.json
 create mode 100644 package.json
 create mode 100644 public/favicon.ico
 create mode 100644 public/index.html
 create mode 100644 src/App.vue
 create mode 100644 src/assets/logo.png
 create mode 100644 src/components/HelloWorld.vue
 create mode 100644 src/main.js
 create mode 100644 src/router/index.js
 create mode 100644 src/store/index.js
 create mode 100644 src/untils/interceptor.js
 create mode 100644 src/views/About.vue
 create mode 100644 src/views/Home.vue

Alan@JIE MINGW64 /e/框架/前端/frame (master)
$ git remote add origin https://github.com/stefan-jie/vueFrame.git

Alan@JIE MINGW64 /e/框架/前端/frame (master)
$ git push -u origin master
Logon failed, use ctrl+c to cancel basic credential prompt.
Username for 'https://github.com':

Alan@JIE MINGW64 /e/框架/前端/frame (master)
$ git push -u origin master
Logon failed, use ctrl+c to cancel basic credential prompt.
Username for 'https://github.com': stefan-jie
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/stefan-jie/vueFrame.git/'

Alan@JIE MINGW64 /e/框架/前端/frame (master)
$ git push -u origin master
Enumerating objects: 26, done.
Counting objects: 100% (26/26), done.
Delta compression using up to 4 threads
Compressing objects: 100% (21/21), done.
Writing objects: 100% (26/26), 86.47 KiB | 2.54 MiB/s, done.
Total 26 (delta 0), reused 0 (delta 0)
To https://github.com/stefan-jie/vueFrame.git
 * [new branch]      master -> master
Branch 'master' set up to track remote branch 'master' from 'origin'.


上传成功

小结

此次上传过程默认已经下载了git,另外已经填写了Git username和password

目录
相关文章
|
1月前
|
文字识别 异构计算 Python
关于Github中开源OCR项目的实验过程与思考
新手尝试Git clone Python OCR项目,遇到各种报错。测试了Paddle OCR、Tesseract OCR和EasyOCR。Paddle OCR因平台限制未能在Notebook部署,Tesseract OCR在Colab成功但无法复现。EasyOCR最终在阿里云天池和Colab部署成功,但天池GPU资源不足。建议使用魔搭社区的实例,阿里云提供免费OCR服务。寻求简单OCR项目推荐。附EasyOCR安装和使用代码。
79 2
|
1月前
|
人工智能 自然语言处理 iOS开发
『GitHub项目圈选19』推荐5款本周 让人爱不释手 的开源项目
『GitHub项目圈选19』推荐5款本周 让人爱不释手 的开源项目
|
1月前
|
人工智能 自然语言处理 NoSQL
『GitHub项目圈选13』推荐5款本周 让人爱不释手 的开源项目
『GitHub项目圈选13』推荐5款本周 让人爱不释手 的开源项目
|
1月前
|
存储 Web App开发 人工智能
『GitHub项目圈选18』推荐5款本周 超实用 的开源项目
『GitHub项目圈选18』推荐5款本周 超实用 的开源项目
246 1
|
1月前
|
人工智能 物联网 机器人
『GitHub项目圈选17』推荐5款本周 火火火 的AI开源项目
『GitHub项目圈选17』推荐5款本周 火火火 的AI开源项目
605 1
|
1月前
|
JSON 搜索推荐 程序员
『GitHub项目圈选15』推荐5款本周 深受程序员喜爱 的开源项目
『GitHub项目圈选15』推荐5款本周 深受程序员喜爱 的开源项目
|
1月前
|
SQL NoSQL Linux
『GitHub项目圈选11』推荐5款本周 深受开发人员青睐 的开源项目
『GitHub项目圈选11』推荐5款本周 深受开发人员青睐 的开源项目
|
1月前
|
前端开发
Github项目分享——免费的画图工具drow,最新前端面试题整理
Github项目分享——免费的画图工具drow,最新前端面试题整理
|
8天前
|
Kubernetes JavaScript 前端开发
OpenSource项目Github Trending一周回顾
OpenSource项目Github Trending一周回顾
告别龟速,从GitHub快速下载项目的技巧分享,简单又高效!
告别龟速,从GitHub快速下载项目的技巧分享,简单又高效!