Git怎么将文件夹上传至github,全过程

小白建议参考github文件上传全流程-新手入门系列(超详细!!!)

中间可能会有报错

$ ssh -T git@github.com

ssh: connect to host github.com port 22: Connection timed out

这时,参考,如何解决:ssh: connect to host github.com port 22: Connection refused ,即可解决。

正式开始

先在文件夹下面右击运行git bush here,打开命令窗口,测试是否可以链接到github

Lenovo@hero MINGW64 /e/AIRCAS/CopenSourceCode/3 Rclonte-M-TGRS/Codes

复制代码
ssh -T git@github.com

Hi Jie-Bai! You've successfully authenticated, but GitHub does not provide shell access.

Lenovo@hero MINGW64 /e/AIRCAS/CopenSourceCode/3 Rclonte-M-TGRS/Codes

复制代码
git config --global user.name "Jie-Bai"

Lenovo@hero MINGW64 /e/AIRCAS/CopenSourceCode/3 Rclonte-M-TGRS/Codes

复制代码
git config --global user.email "jee_bai@163.com"

Lenovo@hero MINGW64 /e/AIRCAS/CopenSourceCode/3 Rclonte-M-TGRS/Codes

复制代码
 git init

Initialized empty Git repository in E:/AIRCAS/CopenSourceCode/3 Rclonte-M-TGRS/Codes/.git/

Lenovo@hero MINGW64 /e/AIRCAS/CopenSourceCode/3 Rclonte-M-TGRS/Codes (master)

复制代码
git add .

Lenovo@hero MINGW64 /e/AIRCAS/CopenSourceCode/3 Rclonte-M-TGRS/Codes (master)

复制代码
 git commit -m "TGRS work files"

master (root-commit) 7066848\] TGRS work files 156 files changed, 25787 insertions(+) create mode 100644 "ExampleFiles/\\350\\257\\225\\351\\252\\214XXXXX_X_0_Y_0_20221019_18_30_45_ch23_3_556.csv" create mode 100644 create mode 100644 Rclonte-M/finalParas.xlsx create mode 100644 measuredDataDecompositionRclonte_M.py Lenovo@hero MINGW64 /e/AIRCAS/CopenSourceCode/3 Rclonte-M-TGRS/Codes (master) git remote -v Lenovo@hero MINGW64 /e/AIRCAS/CopenSourceCode/3 Rclonte-M-TGRS/Codes (master) 替换为自己要上传的仓库的git链接 git remote add origin git@github.com:Jie-Bai/Rclonte-M-TGRS.git Lenovo@hero MINGW64 /e/AIRCAS/CopenSourceCode/3 Rclonte-M-TGRS/Codes (master) git push -u origin master Enumerating objects: 165, done. Counting objects: 100% (165/165), done. Delta compression using up to 16 threads Compressing objects: 100% (165/165), done. Writing objects: 100% (165/165), 15.49 MiB \| 1.70 MiB/s, done. Total 165 (delta 73), reused 0 (delta 0), pack-reused 0 remote: Resolving deltas: 100% (73/73), done. remote: remote: Create a pull request for 'master' on GitHub by visiting: remote: https://github.com/Jie-Bai/Rclonte-M-TGRS/pull/new/master remote: To github.com:Jie-Bai/Rclonte-M-TGRS.git * \[new branch\] master -\> master branch 'master' set up to track 'origin/master'. Lenovo@hero MINGW64 /e/AIRCAS/CopenSourceCode/3 Rclonte-M-TGRS/Codes (master) $ #### 以下内容为为了防止上面链接【[如何解决:ssh: connect to host github.com port 22: Connection refused](https://blog.csdn.net/hjy_mysql/article/details/131596257) 】消失而截图保存的一些内容,主要为创建SSH以及和本地链接的过程。 Lenovo@hero MINGW64 /e/AIRCAS/CopenSourceCode/3 Rclonte-M-TGRS/Codes $ ssh-keygen -t ed25519 -C "jee_bai@163.com" Generating public/private ed25519 key pair. Enter file in which to save the key (/c/Users/Lenovo/.ssh/id_ed25519): Created directory '/c/Users/Lenovo/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /c/Users/Lenovo/.ssh/id_ed25519 Your public key has been saved in /c/Users/Lenovo/.ssh/id_ed25519.pub The key fingerprint is:..................... The key's randomart image is: .............................. \|.o. \| \|...E. . \| \|... .o o o . \| \|. o. = = o \| \|. . o.= S o \| \| + *.* B . \| \|o +.@ + \* . . \| \| ...o X . B . \| \| ...\* o o. \| ±---\[SHA256\]-----+ Lenovo@hero MINGW64 /e/AIRCAS/CopenSourceCode/3 Rclonte-M-TGRS/Codes $ ssh -T git@github.com ssh: connect to host github.com port 22: Connection timed out https://blog.csdn.net/hjy_mysql/article/details/131596257 ![在这里插入图片描述](https://file.jishuzhan.net/article/1747757672465174530/08646cc135c355ec97a4c24c3a4b9364.webp) Host github.com Hostname ssh.github.com Port 443 ![在这里插入图片描述](https://file.jishuzhan.net/article/1747757672465174530/fa3aaf76ba0c3f343391abfa0f36ed94.webp) ![在这里插入图片描述](https://file.jishuzhan.net/article/1747757672465174530/7196f1bd174c9b18d6b5b709ec817d9b.webp) ![在这里插入图片描述](https://file.jishuzhan.net/article/1747757672465174530/63a18163288d6486c8a6a9634f09bee5.webp) ![在这里插入图片描述](https://file.jishuzhan.net/article/1747757672465174530/bf5e22769e536fd8c65c5ebcedc18098.webp) ![在这里插入图片描述](https://file.jishuzhan.net/article/1747757672465174530/23e9c31ebebec451e2c5c69ca8049530.webp) Lenovo@hero MINGW64 /e/AIRCAS/CopenSourceCode/3 Rclonte-M-TGRS/Codes $ ssh -T git@github.com The authenticity of host '\[ssh.github.com\]:443 (\[20.205.243.160\]:443)' can't be established. ED25519 key fingerprint is SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU. This key is not known by any other names. Are you sure you want to continue connecting (yes/no/\[fingerprint\])? y Please type 'yes', 'no' or the fingerprint: yes Warning: Permanently added '\[ssh.github.com\]:443' (ED25519) to the list of known hosts. Hi Jie-Bai! You've successfully authenticated, but GitHub does not provide shell access.

相关推荐
不会聊天真君6478 分钟前
ES(springcloud笔记第五期)
笔记·elasticsearch·spring cloud
时空自由民.9 分钟前
repo 学习教程
大数据·学习·elasticsearch
刘一说9 分钟前
Elasticsearch HTTPS访问错误解决指南
大数据·elasticsearch·https
FutureUniant1 小时前
GitHub每日最火火火项目(9.10)
人工智能·microsoft·计算机视觉·ai·github
就是帅我不改1 小时前
10万QPS压垮系统?老司机一招线程池优化,让性能飞起来!
后端·面试·github
Frank_zhou1 小时前
Easy-Es 架构设计详解
后端·elasticsearch
狗头大军之江苏分军1 小时前
Meta万人裁员亲历者自述:小扎尝到了降本的甜头
前端·后端·github
华略创新2 小时前
引入外部咨询顾问,提供专业指导——制造企业大型系统项目的明智之选
大数据·制造·crm·erp系统·企业管理软件
杨杨杨大侠2 小时前
附录 1:🚀 Maven Central 发布完整指南:从零到成功部署
java·github·maven
Clownseven3 小时前
腾讯云远程桌面连接不上?5步排查法解决RDP连接失败
云计算·github·腾讯云