Git LFS 2.2.0 released
Git LFS v2.2.0 is now available with the all-new git-lfs-migrate command, making it easier than ever to start using Git LFS in your repository. For example, if you’ve tried to…
Git LFS v2.2.0 is now available with the all-new git-lfs-migrate command, making it easier than ever to start using Git LFS in your repository.
For example, if you’ve tried to push a large file to GitHub without LFS, you might have seen the following error:
$ git push origin master
# ...
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: error: See http://git.io/iept8g for more information.
remote: error: File a.psd is 1.2 GB; this exceeds GitHub's file size limit of 100.00 MB
to github.com:ttaylorr/demo.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@github.com:ttaylorr/demo.git'
You can use the git lfs migrate info
command to see which files are causing the push failure:
$ git lfs migrate info
*.psd 1.2 GB 27/27 files(s) 100%
Using the information above, you can determine which files to pluck out of your history and store in LFS:
$ git lfs migrate import --include="*.psd"
migrate: Sorting commits: ..., done
migrate: Rewriting commits: 100% (810/810), done
master f18bb746d44e8ea5065fc779bb1acdf3cdae7ed8 -> 35b0fe0a7bf3ae6952ec9584895a7fb6ebcd498b
migrate: Updating refs: ..., done
$ git push origin
Git LFS: (1 of 1 files) 1.2 GB / 1.2 GB
# ...
To github.com:ttaylorr/demo.git
* [new branch] master -> master
You can also configure the ‘import’ command to migrate specific filetypes, branches, and more. For a detailed overview, take a look at the man page.
This was a quick look at the migrate
command available today in Git LFS v2.2.0. For more on the full release, check out the release notes.
Tags:
Written by
Related posts
Git security vulnerabilities announced
A new set of Git releases were published to address a variety of security vulnerabilities. All users are encouraged to upgrade. Take a look at GitHub’s view of the latest round of releases.
Game Off 2024 winners
Secrets spilled, discovered, and hidden again—Game Off 2024 brought over 500 jaw-dropping submissions that redefined creativity in gaming. From cult quests for free furniture to spellbinding mysteries, these games will have you hooked. Ready to uncover the winners?!?
Highlights from Git 2.48
The open source Git project just released Git 2.48. Here is GitHub’s look at some of the most interesting features and changes introduced since last time.