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

目录
相关文章
|
2月前
|
开发工具 git 开发者
2024最简七步完成 将本地项目提交到github仓库方法
该文章提供了一个简洁的七步教程,指导用户如何将本地项目提交到GitHub仓库。
2024最简七步完成 将本地项目提交到github仓库方法
|
15天前
|
编解码 Oracle Java
java9到java17的新特性学习--github新项目
本文宣布了一个名为"JavaLearnNote"的新GitHub项目,该项目旨在帮助Java开发者深入理解和掌握从Java 9到Java 17的每个版本的关键新特性,并通过实战演示、社区支持和持续更新来促进学习。
53 3
|
2月前
|
Java
Java系列之 解决 项目 jar 包无法上传到Github
该博客文章介绍了解决Java项目中jar包无法上传到Github的问题,通过修改`.gitignore`文件来包含jar包,从而成功添加到上传目录。
Java系列之 解决 项目 jar 包无法上传到Github
|
2月前
|
Rust 前端开发 JavaScript
Github 2024-05-20 开源项目周报 Top15
根据Github Trendings的统计,2024年5月20日当周共有15个项目上榜。按开发语言分类,项目数量如下:Python项目5个,TypeScript项目3个,C++项目2个,Jupyter Notebook项目2个,C、Go、Rust和C#项目各1个。介绍了多个值得关注的项目,包括ChatGPT桌面应用程序、Fooocus图像生成软件、Jellyfin媒体系统等。这些项目涵盖了多种功能和技术领域,值得关注和研究。
50 3
|
2月前
|
数据采集 编解码 算法
Github | 推荐一个Python脚本集合项目
Github | 推荐一个Python脚本集合项目
|
2月前
|
SQL JavaScript 前端开发
Github 2024-08-05 开源项目周报 Top15
根据 Github Trendings 的统计,本周(2024年8月5日统计)共有15个项目上榜。以下是根据开发语言汇总的项目数量: - Go 项目:4个 - JavaScript 项目:3个 - Python 项目:3个 - Java 项目:2个 - TypeScript 项目:2个 - C 项目:1个 - Shell 项目:1个 - Dockerfile 项目:1个 - 非开发语言项目:1个
65 2
|
2月前
|
人工智能 Rust JavaScript
Github 2024-08-26 开源项目周报Top15
根据Github Trendings的统计,本周共有15个项目上榜。以下是按开发语言汇总的项目数量:Python项目8个,TypeScript、C++ 和 Rust 项目各2个,Jupyter Notebook、Shell、Swift 和 Dart 项目各1个。其中,RustDesk 是一款用 Rust 编写的开源远程桌面软件,可作为 TeamViewer 的替代品;Whisper 是一个通用的语音识别模型,基于大规模音频数据集训练而成;初学者的生成式人工智能(第2版)则是由微软提供的18门课程,教授构建生成式AI应用所需的知识。
107 1
|
2月前
|
Rust Dart 前端开发
Github 2024-08-19 开源项目周报Top15
根据Github Trendings的统计,本周(2024年8月19日统计)共有15个项目上榜。按开发语言分类,上榜项目数量如下:Python项目最多,有7项;其次是JavaScript和TypeScript,各有3项;Dart有2项;HTML、PowerShell、Clojure和C++各1项。此外,还介绍了多个热门项目,包括Bootstrap 5、RustDesk、ComfyUI、易采集、Penpot等,涵盖了Web开发、远程桌面、自动化测试、设计工具等多个领域。
97 1
|
2月前
|
JavaScript 前端开发 Go
Github 2024-08-12 开源项目周报 Top14
本周Github Trendings共有14个项目上榜,按开发语言汇总如下:Python项目7个,TypeScript项目5个,C项目2个,JavaScript项目2个,Go和Batchfile项目各1个。其中亮点包括开发者职业成长指南、Windows激活工具、ComfyUI图形界面、AFFiNE知识库、易采集可视化爬虫等项目,涵盖多种实用工具和开源平台。
86 1
|
2月前
|
存储 JavaScript 前端开发
Github 2024-07-29 开源项目周报Top15
根据 Github Trendings 的统计,本周(2024年7月29日统计)共有15个项目上榜。按开发语言分类,项目数量如下:Python、Java、HTML 和 C 项目各有2项;TypeScript、JavaScript、Vue 和 Go 各有1项;另有1项非特定语言项目、1项 Dart 项目、1项 C++ 项目、1项 Rust 项目及1项 Jupyter Notebook 项目。这些项目涵盖了多种领域,如API开发、照片管理、PDF处理、AI技术等。
56 1