众所周知,github不能上传过大的文件。本人由于需将资料pdf上传备份,故参考多份博客得以解决。
对于已经将git在本地配置过的只需三步即可完成。若尚未配置好git,请先浏览其他博客完成git设置。
1 安装下载Git Large File Storage
要上传大文件首先需要获取对于git大文件上传支持的git lfs程序。
2 Git Large File Storage配置
在git仓库所在文件夹中输入如下代码,用于安装。
git lfs install3 文件上传
在安装git lfs后依次输入下列代码即可。
git lfs track "YourFileName"git add .gitattributesgit commit -m "..."git push #上传用于替代大文件的指针git add YourFileNamegit commit -m "..."git push #正常上传文件即可如此即可实现在github上对于大文件的上传
As is widely known, GitHub cannot upload excessively large files. I needed to back up PDF documents, so I consulted several blogs to find a solution.
For those who have already configured Git locally, three steps are enough. If Git is not configured yet, please refer to other blogs to complete the Git setup.
1 Install and download Git Large File Storage
To upload large files, you first need to obtain the Git LFS program that supports Git large-file uploads.
2 Configuring Git Large File Storage
In the folder containing the Git repository, enter the following commands to install.
git lfs install3 File Upload
After installing Git LFS, enter the following commands in order.
git lfs track "YourFileName"git add .gitattributesgit commit -m "..."git push #上传用于替代大文件的指针git add YourFileNamegit commit -m "..."git push #正常上传文件即可This will enable uploading large files on GitHub.
ご存知のとおり、GitHubには大きすぎるファイルをアップロードすることはできません。私は資料のPDFをアップロードしてバックアップする必要があるため、複数のブログを参考にして解決しました。
すでにローカルにGitが設定されている場合は、3つのステップで完了します。まだGitの設定が済んでいない場合は、他のブログを参照して設定を完了してください。
1 Git Large File Storage のインストールとダウンロード Git Large File Storage
大きなファイルをアップロードするには、まずGit LFS(Large File Storage)に対応した git lfs プログラムを取得する必要があります。
2 Git Large File Storage の設定
Git リポジトリがあるフォルダで、以下のコードを入力してインストールします。
git lfs install3 ファイルのアップロード
Git LFSをインストールしたら、以下のコードを順に入力します。
git lfs track "YourFileName"git add .gitattributesgit commit -m "..."git push #上传用于替代大文件的指针git add YourFileNamegit commit -m "..."git push #正常上传文件即可このようにして、GitHub 上で大容量ファイルをアップロードすることができます。
部分信息可能已经过时









