github仓库

1

git init

2

git add .

3
查询状态

git status

4

git commit -m ‘messge‘

5

git remote add origin xxxxx(这里是网址,在你空仓库的首页中code页面最上部分的文本框中可以找到。一般是https://github.com/账户名称/空仓库名称)
git remote rm origin (当出现错误时,可以将其删除,重新创建)

6

git push -u origin master

问题1
报错信息

remote: error: Trace: 62a75df3a7549a028d6db300346d869ebe2be48b4dd7ceb45bc370ad6b2ced12
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File optimal/src/.vscode/browse.vc.db is 284.37 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.

optimal/src/.vscode/browse.vc.db 文件太大需要删除
解决1

git rm --cached /media/sp/lx/ubuntu/event_camera/optimal/src/.vscode/browse.vc.db
git commit --amend -CHEAD

问题2

error: RPC failed; curl 55 Failed sending data to the peer 
fatal: The remote end hung up unexpectedly

解决2

git config --local http.postBuffer 524288000

问题3

remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.

解决3

token问题:https://blog.csdn.net/weixin_41010198/article/details/119698015?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522165778270816782391888653%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&request_id=165778270816782391888653&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~baidu_landing_v2~default-4-119698015-null-null.142^v32^experiment_2_v1,185^v2^control&utm_term=remote%3A%20Support%20for%20password%20authentication%20was%20removed%20on%20August%2013%2C%202021.%20Please%20use%20a%20personal%20access%20token%20instead.&spm=1018.2226.3001.4187

问题4

fatal: unable to access 'https://github.com/Cmome/event_camera.git/': Failed to connect to github.com port 443: Connection timed out

解决4

sudo gedit /etc/hosts
打开/etc/hosts文件,将github.com对应的行屏蔽掉
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
要设置GitHub仓库,你可以按照以下步骤进行操作: 1. 首先,你需要在GitHub上创建一个账号。如果已经有账号,可以直接登录。 2. 登录后,在页面右上角点击加号(+)按钮,然后选择“New repository”(新建仓库)。 3. 在新建仓库页面上,你需要填写一些基本信息: - 仓库名称:给你的仓库起一个唯一的名称。 - 描述(可选):简要描述你的仓库是关于什么的。 - 可见性:选择是公开还是私有仓库。 - 初始化选项:选择是否初始化仓库,可以选择添加一个README文件、添加一个.gitignore文件或者选择一个许可证。 4. 填写完基本信息后,点击“Create repository”(创建仓库)按钮。 5. 接下来,你可以选择使用命令行或者图形化界面来进行仓库的设置和管理。 - 命令行方式: - 打开终端或命令行工具,进入到你的本地项目目录。 - 使用`git init`命令将该目录初始化为一个Git仓库。 - 使用`git remote add origin <仓库URL>`命令将本地仓库与远程仓库关联起来。 - 使用`git add .`命令将所有文件添加到暂存区。 - 使用`git commit -m "Initial commit"`命令提交更改。 - 使用`git push -u origin master`命令将本地仓库的内容推送到远程仓库。 - 图形化界面方式: - 打开GitHub Desktop或其他Git图形化界面工具。 - 点击“Add”(添加)按钮,选择你的本地项目目录。 - 点击“Publish repository”(发布仓库)按钮,选择远程仓库并进行相关设置。 - 点击“Commit”(提交)按钮,将更改提交到本地仓库。 - 点击“Push origin”(推送到远程仓库)按钮,将本地仓库的内容推送到远程仓库。 设置完GitHub仓库后,你就可以在仓库中进行代码管理、版本控制和协作开发了。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值