Large files detected. You may want to try Git Large File Storage - https://g

github上做了一个开源库,有一个大概100M+的文件,在commit完成了,push的时候 总是报错,大致信息如下:

remote: Resolving deltas: 100% (472/472), done.
remote: error: GH001: Large files detected. 
You may want to try Git Large File Storage - https://git-lfs.github.com.

上面错误的原因很好理解就是GitHub不允许直接上传大文件(超过100M)的文件到远程仓库,若要想继续提交可以尝试使用大文件支持库:https://git-lfs.github.com

如果大家有时间,可以直接参考官方网站:官网

LFS安装和使用的简单步骤:

curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
sudo apt-get install git-lfs

然后去到你github的仓库文件夹下面,运行下面指令,记得修改your_file_name!!!不要直接复制!!!:

git lfs install
git lfs track “your_file_name”
git add .gitattributes
git add your_file_name
git commit -m "test"
git push 

但是,失败了,所以转成删除大文件。
git中如果出现大文件的话,建议删除,用下面指令,记得修改your_file_name!!!不要直接复制!!!:

git rev-list --objects --all | grep "$(git verify-pack -v .git/objects/pack/*.idx | sort -k 3 -n | tail -5 | awk '{print$1}')"

git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch your_file_name' --prune-empty --tag-name-filter cat -- --all

git push origin --force --all

git 修改 remote地址:

git remote set-url origin https://github.com/shanpenghui/XXXXXXX.git
git push origin --force --all
  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
-- Detected 64-bit platform -- UNIX: Configuring uninstall target -- UNIX: Created uninstall target -- UNIX: Using default system linker -- UNIX: Detected compiler: /usr/bin/cc -- Clang: Minimum version required is 7.0.0, found 14.0.0 - ok! -- Using mysql-config: /usr/bin/mysql_config -- Found MySQL library: /usr/lib/x86_64-linux-gnu/libmysqlclient.so -- Found MySQL headers: /usr/include/mysql -- Found MySQL executable: /usr/bin/mysql fatal: 不是 git 仓库(或者任何父目录):.git CMake Error at cmake/genrev.cmake:116 (string): string sub-command REGEX, mode MATCH needs at least 5 arguments total to command. Call Stack (most recent call first): CMakeLists.txt:83 (include) * TrinityCore revision : + (+ branch) * TrinityCore buildtype : RelWithDebInfo * Install core to : /home/wow/server3.5.5 * Install configs to : /home/wow/server/etc * Build world/auth : Yes (default) * Build with scripts : Yes (static) * Build map/vmap tools : Yes (default) * Build unit tests : No (default) * Build core w/PCH : Yes (default) * Build scripts w/PCH : Yes (default) * Show compile-warnings : No (default) * Use coreside debug : No (default) * Show source tree : Yes (hierarchical) * Use GIT revision hash : Yes (default) -- Found OpenSSL library: /usr/lib/x86_64-linux-gnu/libssl.so;/usr/lib/x86_64-linux-gnu/libcrypto.so -- Found OpenSSL headers: /usr/include CMake Error at cmake/macros/FindOpenSSL.cmake:579 (message): TrinityCore needs OpenSSL version 1.0 but found too new version 3.0.2. TrinityCore needs OpenSSL 1.0.x or 1.1.x to work properly. If you still have problems please install OpenSSL 1.0.x if you still have problems search on forum for TCE00022 Call Stack (most recent call first): dep/openssl/CMakeLists.txt:16 (find_package) -- Configuring incomplete, errors occurred! See also "/home/wow/TrinityCore/TrinityCore-TDB335.22061/build/CMakeFiles/CMakeOutput.log". See also "/home/wow/TrinityCore/TrinityCore-TDB335.22061/build/CMakeFiles/CMakeError.log".
05-13
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

晚餐男孩

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值