如何解决错误! [远程拒绝] tortoiseGit 中的 main -> main(预接收钩子被拒绝)?

问题描述 投票:0回答:1

错误详情:

[git.exe push --progress "origin" main:main
Enumerating objects: 128, done.
Counting objects: 100% (128/128), done.
Delta compression using up to 8 threads
Compressing objects: 100% (100/100), done.
Writing objects: 100% (110/110), 158.47 MiB | 1.88 MiB/s, done.
Total 110 (delta 34), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (34/34), completed with 8 local objects.
remote: error: Trace: 7bb86f7cc5c0d39363c909d35194c3f8241396d6eeead4323992b97257ec847e
remote: error: See https://gh.io/lfs for more information.
remote: error: File pdfGenerationFromHtmlRazor/DinkToPDF.zip is 113.39 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.
To github.com:NakibBracu/.Net-Practise-DEVSkill.git
! [remote rejected] main -> main (pre-receive hook declined)
error: failed to push some refs to 'github.com:NakibBracu/.Net-Practise-DEVSkill.git']

我想知道如何仅使用 Tortoise git 解决这个问题。如果我的文件大小大于 100mb 并且错误地提交了该文件。那么如何解决这个问题以跟踪大文件并专门选择忽略它。因为我已经提交并推送了其他子目录,这就是问题所在。

github tortoisegit github-issues
1个回答
0
投票

错误消息中包含过大文件的文件名。

现在打开该文件的日志以查找添加该文件的提交。

然后打开整个存储库的日志(例如,通过选择左下角的整个项目)。

单击上一个提交并选择对此进行变基。在变基对话框中编辑有问题的提交。当rebase停止时,选择底部的编辑提交,选择继续并取消选择大文件。完成变基。完成。

© www.soinside.com 2019 - 2024. All rights reserved.