Movatterモバイル変換


[0]ホーム

URL:


Skip to contentSkip to sidebar
/Blog
Try GitHub CopilotSee what's new

Git LFS 2.5.0 is now available

Git LFS 2.5.0 comes with three new migration modes, a handful of bug fixes, and more.

|
|2 minutes
  • Share:

A new version ofGit LFS, the open-source Git extension for versioning large files, is now available. Git LFS v2.5.0 comes with three new migration modes, a handful of bug fixes, and more.

Download Git LFS v2.5.0

New migration modes

With v2.5.0, you can use thegit lfs migrate command in a few new ways.

Sometimes repositories can get into a broken state when large files that should have been committed with Git LFS aren’t. If your file is over 100 MB, you won’t be able to push to GitHub, and your history will require rewriting withgit lfs migrate import. If you have a file smaller than 100 MB, you can usegit lfs migrate import --no-rewrite to create new commits that move the file to Git LFS, allowing you to repair the state of your repository more easily than ever.

If you have committed a handful of files that should have been stored with Git LFS, but aren’t, you can let Git LFS determine the affected files for you by runninggit lfs migrate import --fixup. The--fixup flag automatically reads.gitattributes file(s) in your repository, and converts Git objects that should be stored with Git LFS automatically:

In the following example, notice how our.gitattributes file says that*.png‘s should be tracked using Git LFS, but we addedmona.png without Git LFS:

$ cat .gitattributes*.png filter=lfs diff=lfs merge=lfs -text$ git cat-file -p :mona.png | file -s/dev/stdin: PNG image data, 896 x 896, 8-bit/color RGBA, non-interlaced

We can easily fix this without having to tell Git LFS which files to start tracking:

$ git lfs migrate import --fixupmigrate: Fetching remote refs: ..., donemigrate: Sorting commits: ..., donemigrate: Rewriting commits: 100% (2/2), done  master        1002728154804338fe645976ad8b7258b0be0810 -> 076e2bfe114df5575b1130f694c18d1b26c86b86migrate: Updating refs: ..., donemigrate: checkout: ..., done$ git cat-file -p :mona.pngversion https://git-lfs.github.com/spec/v1oid sha256:49afbfc61b10df78377f8f7dac774158e1a0197740e160ea3572d9839c61ac04size 106277

Nowmona.png is stored correctly using Git LFS!

Lastly, if you want to stop using Git LFS and export your large objects, you can usegit lfs migrate export. It accepts the same arguments asgit lfs migrate import, and easily allows you to take files out of Git LFS.

Developer ergonomics

We have updated several of the scripts and programs used to develop and hack on Git LFS to feel more familiar to open source contributors. The test suite now outputs results using the TAP format, enabling it to be run withprove. Similarly, the project can now be built using aMakefile, which should feel more familiar to developers comfortable working with Git.

Additional updates

You’ll see a handful of other new features and bug fixes in v2.5.0 like improved support for object alternates, correctgit lfs status output from subdirectories, and more.

For instructions on configuring Git LFS,refer to this article.

Download Git LFS v2.5.0


Tags:

Written by

Taylor Blau

Taylor Blau

@ttaylorr

Taylor Blau is a Principal Software Engineer at GitHub where he works on Git.

More onGit

Highlights from Git 2.52

The open source Git project just released Git 2.52. Here is GitHub’s look at some of the most interesting features and changes introduced since last time.

20 Years of Git, 2 days at GitHub HQ: Git Merge 2025 highlights 🎉

Git Merge 2025 celebrated 20 years of Git with talks, collaboration, and community. Catch the highlights and recordings.

Related posts

Maintainers

MCP joins the Linux Foundation: What this means for developers building the next era of AI tools and agents

MCP is moving to the Linux Foundation. Here’s how that will affect developers.

A decorative header showing several rectangles surrounding a circle.
Maintainers

“The local-first rebellion”: How Home Assistant became the most important project in your house

Learn how one of GitHub’s fastest-growing open source projects is redefining smart homes without the cloud.

git 2.52 is here!
Git

Highlights from Git 2.52

The open source Git project just released Git 2.52. Here is GitHub’s look at some of the most interesting features and changes introduced since last time.

Explore more from GitHub

Docs

Docs

Everything you need to master GitHub, all in one place.

Go to Docs
GitHub

GitHub

Build what’s next on GitHub, the place for anyone from anywhere to build anything.

Start building
Customer stories

Customer stories

Meet the companies and engineering teams that build with GitHub.

Learn more
The GitHub Podcast

The GitHub Podcast

Catch up on the GitHub podcast, a show dedicated to the topics, trends, stories and culture in and around the open source developer community on GitHub.

Listen now

We do newsletters, too

Discover tips, technical guides, and best practices in our biweekly newsletter just for devs.


[8]ページ先頭

©2009-2025 Movatter.jp