Notes | GitHub Upload Large Files

Posted PyStaData

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Notes | GitHub Upload Large Files相关的知识,希望对你有一定的参考价值。

Source: https://git-lfs.github.com/

Step 01

Download[1] and install the Git command line extension. Once downloaded and installed, set up Git LFS for your user account by running:

git lfs install

Step 02

You only need to run this once per user account.

In each Git repository where you want to use Git LFS, select the file types you'd like Git LFS to manage (or directly edit your .gitattributes). You can configure additional file extensions at anytime.

git lfs track "*.psd"

Now make sure .gitattributes is tracked:

git add .gitattributes

Note that defining the file types Git LFS should track will not, by itself, convert any pre-existing files to Git LFS, such as files on other branches or in your prior commit history. To do that, use the git lfs migrate[2] command, which has a range of options designed to suit various potential use cases.

Step 03

There is no step three. Just commit and push to GitHub as you normally would.

git add file.psdgit commit -m "Add design file"git push origin master

References

[1]

Download: https://github.com/git-lfs/git-lfs/releases/download/v2.11.0/git-lfs-windows-v2.11.0.exe

[2]

git lfs migrate: https://github.com/git-lfs/git-lfs/blob/master/docs/man/git-lfs-migrate.1.ronn?utm_source=gitlfs_site&utm_medium=doc_man_migrate_link&utm_campaign=gitlfs


以上是关于Notes | GitHub Upload Large Files的主要内容,如果未能解决你的问题,请参考以下文章

Git Learning2 GitHub upload

将json数据转换为角度2+的对象[重复]

OSCP Learning Notes - Post Exploitation

批量上传图片(jQuery-File-Upload使用)

算法 Notes|LeetCode 26. 删除排序数组中的重复项 - easy

算法 Notes|LeetCode 26. 删除排序数组中的重复项 - easy