DEV Community

Cover image for Files got to big in your git repo? Git-LFS migrate command to the rescue
João Paulo
João Paulo

Posted on

Files got to big in your git repo? Git-LFS migrate command to the rescue

What happens if you commit a file and at some point it got too big for Github?

All I was hearing is about a tool called git-lfs and it always involve having to clear my commits manually removing the now huge file.

What I discovered today is that there is a command called migrate in git-lfs that does everything for you!

git lfs migrate import --include="*.psd"

Thanks for the code gods in git-lfs repo! 🙌🏻

GitHub logo git-lfs / git-lfs

Git extension for versioning large files

Git Large File Storage

CI status

Git LFS is a command line extension and specification for managing large files with Git.

The client is written in Go, with pre-compiled binaries available for Mac Windows, Linux, and FreeBSD. Check out the website for an overview of features.

Getting Started

Downloading

You can install the Git LFS client in several different ways, depending on your setup and preferences.

  • Linux users. Debian and RPM packages are available from PackageCloud.
  • macOS users. Homebrew bottles are distributed, and can be installed via brew install git-lfs.
  • Windows users. Git LFS is included in the distribution of Git for Windows. Alternatively, you can install a recent version of Git LFS from the Chocolatey package manager.
  • Binary packages. In addition, binary packages are available for Linux, macOS, Windows, and FreeBSD.
  • Building from source. This repository can also be built from source using…

Top comments (0)