如何在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

目录
相关文章
|
JSON Kubernetes 安全
找到啦,我们已上车,Github 27000+ star,研发团队必备开源工具项目,真丝滑!!!
Trivy 是一款高效灵活的开源安全扫描工具,支持容器镜像、文件系统、Kubernetes 等多目标扫描,具备快速、易用、集成性强等特点,适用于 DevSecOps 全流程安全检测。
567 0
|
开发工具 git C++
【够用就好002】外行第一次发布github项目仓库
#deepseek#自学 记录外行学习代码的历程 今天是上传自己的工具代码到github仓库,一直以来是伸手党克隆别人的项目,今天在deepseek的辅导下上传自己的内容。
|
人工智能 JavaScript 前端开发
Github 2024-10-28 开源项目周报 Top15
本周GitHub热门项目涵盖Svelte、Open Interpreter、PowerShell等,涉及Web开发、AI助手、自动化工具等领域,Python、JavaScript为主流语言,展现开源技术活跃生态。(239字)
1334 19
|
人工智能 JavaScript 前端开发
Github 2024-11-04 开源项目周报 Top14
本周GitHub热门项目涵盖屏幕截图转代码、网页监控、低代码开发等。Python与TypeScript主导,亮点项目包括AI生成代码工具、开源社交应用Bluesky及机器人框架LeRobot,展现AI与自动化技术的快速发展趋势。
735 15
|
人工智能 JavaScript Docker
Github 2024-11-11 开源项目周报 Top15
本周GitHub热门项目涵盖多领域:Python与TypeScript领跑,包括屏幕截图转代码、本地文件共享、PDF处理、AI开发代理等。亮点项目如screenshot-to-code、LocalSend、OpenHands及Diagrams,兼具创新与实用性,广受开发者关注。
1164 13
|
人工智能 算法 JavaScript
Github 2024-10-14 开源项目周报 Top14
本周GitHub热门项目共14个,Python项目占7席。涵盖算法实现、生成式AI、金融分析、目标检测等领域,包括TheAlgorithms系列、OpenBB金融平台、Ultralytics YOLO11、Manim动画框架等,展现开源技术多元发展态势。
660 8
|
人工智能 Rust JavaScript
Github 2024-10-07 开源项目周报 Top15
本周GitHub热门项目共15个,Python项目占比最高达7个。榜首为Python算法实现集合TheAlgorithms/Python,Star数超17万;其他亮点包括Godot游戏引擎、OpenBB金融平台、ToolJet低代码框架及新兴AI相关项目如Crawl4AI、Llama Stack等,涵盖游戏、金融、AI、理财等多个领域。
696 4
|
人工智能 Rust 算法
Github 2024-09-30 开源项目周报 Top15
本周GitHub热门项目揭晓:Python主导,AutoGPT居首,涵盖AI、编程、数学动画等领域,助力开发者探索前沿技术。
594 4
|
人工智能 JavaScript 前端开发
Github 2024-09-16 开源项目周报 Top14
本周GitHub热门项目涵盖Python、TypeScript、Go等语言,React居首。亮点包括微软PowerToys、Node版本管理器、AI证件照工具HivisionIDPhotos及端侧大模型MiniCPM等。
494 2
|
Rust JavaScript 安全
Github 2024-09-02 开源项目周报 Top13
本周GitHub热门项目涵盖AI、开发工具与开源替代品。包括Notion替代AppFlowy、Airtable替代NocoDB、云平台Coolify及可观察性平台OpenObserve等,涉及Python、TypeScript、Rust等语言,聚焦效率、隐私与自动化。
726 1