跳至内容

Git

ssh密钥进行github身份验证,ssh公私密钥使用详解,github密钥配置与使用,git密钥使用详解,git入门教程_哔哩哔哩_bilibili

Git 常见错误 之 error: src refspec xxx does not match any / error: failed to push some refs to 简单解决方法_error: src refspec master does not match any-CSDN博客

手把手教你用git上传项目到GitHub(图文并茂,这一篇就够了),相信你一定能成功!! - 知乎

更改默认分支 - GitHub 文档

云和本地ssh密钥配置

见第一个链接视频

本地文件夹上传到main

  • 在项目文件夹右键然后找到git bash点击打开
  • 输入以下命令:
1
2
3
4
5
git init
git add .
git commit -m "first"
git remote add healthrag git@github.com:rooobeam/HealthRAG.git # 关联远程仓库 healrag是远程名,本地名会显示在输入上一行末尾蓝色字体。
git push -u healthrag master # master是本地名,即蓝色字体
  • 然后到github上仓库页面,找到右上角setting,进入setting找到Default branch,更改然后可以把旧的删掉,然后添加README.md如果原本没有的话。

  • 如果不想用master这一默认本地名,输入以下命令可以改为新名(mmm),但是不要与原本远程仓库已有branch否则要merge。

1
git branch -m master mmm
最后更新于