Are you happy with your logging solution? Would you help us out by taking a 30-second survey? Click here

git-lfs

Git extension for versioning large files

Star full 4f7b624809470f25b6493d5a7b30d9b9cb905931146e785d67c86ef0c205a402Star full 4f7b624809470f25b6493d5a7b30d9b9cb905931146e785d67c86ef0c205a402Star full 4f7b624809470f25b6493d5a7b30d9b9cb905931146e785d67c86ef0c205a402Star full 4f7b624809470f25b6493d5a7b30d9b9cb905931146e785d67c86ef0c205a402Star half bd79095782ee4930099175e5ce7f4c89fa3ddabcd56fffcc7c74f6f2a2d46b27 (1 ratings)
Rated 4.5 out of 5
Subscribe to updates I use git-lfs


Statistics on git-lfs

Number of watchers on Github 5470
Number of open issues 276
Average time to close an issue 1 day
Main language Go
Average time to merge a PR 2 days
Open pull requests 32+
Closed pull requests 34+
Last commit over 1 year ago
Repo Created about 6 years ago
Repo Last Updated over 1 year ago
Size 9.2 MB
Homepage https://git-lfs.g...
Organization / Authorgit-lfs
Latest Releasev2.4.0
Contributors77
Page Updated
Do you use git-lfs? Leave a review!
View open issues (276)
View on github
Fresh, new opensource launches πŸš€πŸš€πŸš€
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating git-lfs for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)
What people are saying about git-lfs Leave a review
Manage versions of 3rd-Party softwares, and be able to rollback to a previous synchronised state, along with my source code (using sub-modules)

Git Large File Storage

Linux macOS Windows
Linux build status macOS build status Windows build 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 Git LFS website for an overview of features.

Getting Started

By default, the Git LFS client needs a Git LFS server to sync the large files it manages. This works out of the box when using popular git repository hosting providers like GitHub, Atlassian, etc. When you host your own vanilla git server, for example, you need to either use a separate Git LFS server instance, or use the custom transfer adapter with a transfer agent in blind mode, without having to use a Git LFS server instance.

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

Note: Git LFS requires Git v1.8.5 or higher.

Once installed, you need to setup the global Git hooks for Git LFS. This only needs to be done once per machine.

$ git lfs install

Now, it's time to add some large files to a repository. The first step is to specify file patterns to store with Git LFS. These file patterns are stored in .gitattributes.

$ mkdir large-repo
$ cd large-repo
$ git init

# Add all zip files through Git LFS
$ git lfs track "*.zip"

Now you're ready to push some commits:

$ git add .gitattributes
$ git add my.zip
$ git commit -m "add zip"

You can confirm that Git LFS is managing your zip file:

$ git lfs ls-files
my.zip

Once you've made your commits, push your files to the Git remote:

$ git push origin master
Sending my.zip
LFS: 12.58 MB / 12.58 MB  100.00 %
Counting objects: 2, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 548 bytes | 0 bytes/s, done.
Total 5 (delta 1), reused 0 (delta 0)
To https://github.com/git-lfs/git-lfs-test
   67fcf6a..47b2002  master -> master

Limitations

Git LFS maintains a list of currently known limitations, which you can find and edit here.

Need Help?

You can get help on specific commands directly:

$ git lfs help <subcommand>

The official documentation has command references and specifications for the tool. You can ask questions in the Git LFS chat room, or file a new issue. Be sure to include details about the problem so we can troubleshoot it.

  1. Include the output of git lfs env, which shows how your Git environment is setup.
  2. Include GIT_TRACE=1 in any bad Git commands to enable debug messages.
  3. If the output includes a message like Errors logged to /path/to/.git/lfs/objects/logs/*.log, throw the contents in the issue, or as a link to a Gist or paste site.

Contributing

See CONTRIBUTING.md for info on working on Git LFS and sending patches. Related projects are listed on the Implementations wiki page. You can also join the project's chat room.

Using LFS from other Go code

At the moment git-lfs is only focussed on the stability of its command line interface, and the server APIs. The contents of the source packages is subject to change. We therefore currently discourage other Go code from depending on the git-lfs packages directly; an API to be used by external Go code may be provided in future.

Core Team

These are the humans that form the Git LFS core team, which runs the project.

In alphabetical order:

@andyneff @rubyist @sinbad @technoweenie @ttaylorr
git-lfs open issues Ask a question     (View All Issues)
  • almost 3 years Git LFS checkout fails with GIT LFS is disabled after downloading > 2000 files
  • almost 3 years Support for Windows Long Paths
  • almost 3 years Should we post hashes along with the GitLFS releases?
  • almost 3 years 'git lfs track' hangs
  • almost 3 years Having issues with 'error downloading object' on a particular repo
  • almost 3 years git lfs pull --recursive is slower than git lfs pull
  • almost 3 years git-lfs installed errors on macOS 10.12
  • almost 3 years git-lfs not found in epel repository
  • almost 3 years Packagecloud.io install on Fedora 24 can fail under some circumstances
  • almost 3 years Proposal: `transfer` package for v2.0.0
  • almost 3 years Proposal: git/gitscanner package for v2.0
  • almost 3 years "Changed" file sticks around (refuses to go away) after "git reset --hard"
  • almost 3 years LFS Roadmap: v1.5.0 -> v2.0
  • almost 3 years SSH auth and credential helper
  • almost 3 years when i use git push, i met this.
  • almost 3 years git lfs push does not work as a subprocess
  • almost 3 years Add "Check max file limit of your webserver" to known issues
  • almost 3 years 'git lfs pull' fails for a specific file
  • about 3 years Investigate automated Windows building/signing
  • about 3 years Deb package for Ubuntu 16.10 (Yakkety Yak)
  • about 3 years LFS: Client error: https://github-cloud.s3.amazonaws.com/alambic/media/134753364
  • about 3 years git-lfs-fsck failing on deleted files
  • about 3 years Cannot push repository with many files: resource temporarily unavailable
  • about 3 years git lfs mac download issue
  • about 3 years git-lfs install not working
  • about 3 years Merges can create Git LFS pointer files with CRLF line endings on Windows
git-lfs open pull requests (View All Pulls)
  • [WIP] Reduce the number of version defines
  • Catfilebatch unittests
  • WIP: promised downloads (proof of concept)
  • Locking part 1: locking package
  • add test to replicate `track` case insensitivity bug
  • upload debian 9 builds
  • include ref in upload request
  • Sets -ldflags -X ... GitCommit in deb build for short-hash in version…
  • Pkg cleanup
  • Update custom-transfers.md
  • RFC: add option "--size" to ls-files to print the file size
  • Define lockable files, make read-only in working copy when not locked
  • Fixed file paths on cygwin.
  • locking: teach pre-push hook to check for locks
  • commands: convert push, pre-push to use async gitscanner
  • [WIP] test: reproduce git-lfs/git-lfs#1726
  • git/odb: loose object read/write
  • [WIP] lfsapi/ssh: refactor `sshGetExeAndArgs`
  • debian/control: we need golang 1.8
  • [WIP] git lfs migrate
  • fsck only scans current version of objects
  • Add lfs.storage parameter for overriding LFS storage location
  • prune: always prune excluded paths
  • fsck: attach a filter to exclude unfetched items from fsck
  • vendor: update 'xeipuuv/gojsonpointer'
  • commands: clean filepaths in 'git lfs track,untrack'
  • fix race conditions in upload progress meter
  • [WIP] git lfs migrate issues
  • ci: run builds on Go 1.9
  • Support default TTL for authentication tokens acquired via SSH
  • Map local abspath to file://<abspath> endpoint URL
  • Fix: don't loop when got 401 and creds were sent (#2833)
git-lfs questions on Stackoverflow (View All Questions)
  • Xcode and git-lfs
  • git lfs track doesn't list tracked pattern for an existing repo
  • Clone gitlab project that uses git lfs without giving password all the time
  • adding files into git lfs but failed
  • How to specify where Git LFS files will be stored?
  • How to use GIT LFS to track iOS frameworks?
  • git-lfs checkout remote branch
  • Getting rid of pre-push hook for git-lfs
  • delete files that are not in git lfs in some certain folder
  • pre-push hook is reporting that git-lfs is not in my path, but it is
  • Use unity with git LFS
  • Git LFS not working on TeamCity agent
  • Check out git-lfs files on VSTF build
  • Git LFS failing to download specific file on one persons PC
  • Git LFS not working
  • file security with git-lfs on enterprise github
  • BFG: Convert files with and without extensions to GIT LFS
  • git lfs bfg: after that, resolve conflicts how?
  • Git repository file size is larger after migrating to git-lfs
  • migrating existing Git repo to new Git LFS enabled repo
  • Can one clone a Git LFS repo without installing Git LFS?
  • Git LFS not tracking GoogleMaps
  • Is git-lfs needed to push and pull a repo?
  • How to hanlde large files in git without using Git LFS
  • git lfs not recognizing tracked file types
  • Git lfs pull doesn't pull any files
  • How do Git LFS and git-annex differ?
  • git lfs not working properly for files larger than 100MB
  • Git LFS skipped files
  • Is there a way to to use `git lfs` for files larger than X bytes?
git-lfs list of languages used
git-lfs latest release notes
v2.4.0 v2.4.0

This release introduces a rewrite of the underlying file matching engine, expands the API to include relevant refspecs for individual requests, standardizes the progress output among commands, and more.

Please note: in the next MAJOR release (v3.0.0) the semantic meaning behind --include and --exclude flags will change. As the details of exactly which existing patterns will no longer function as previously are known, we will indicate them here. Any --include or --exclude patterns used in v2.3.0 or earlier are expected to work as previously in this release.

This release would not be possible without the open-source community. Specifically, we would like to thank:

  • @larsxschneider: for contributing fixes to the filter operation in git lfs fsck, and git lfs prune, as well as the bug report leading to the filepathfilter changes.
  • @yfronto: for adding new Linux release targets.
  • @stffabi: for adding support for NTLM with SSPI on Windows.
  • @jeffreydwalter: for fixing memory alignment issues with sync/atomic on 32-bit architectures.
  • @b4mboo: for adding a LFS configuration key to the list of safe configuration options.

Without the aforementioned indviduals, this release would not have been possible. Thank you!

Features

  • Support wildmatch-compliant options in --include, --exclude
    • filepathfilter: implement using wildmatch #2875 (@ttaylorr)
    • test: add wildmatch migration tests #2888 (@larsxschneider, @ttaylorr)
  • Expand the specification to include relevant refspecs
    • verify locks against each ref being pushed #2706 (@technoweenie)
    • Batch send refspec take 2 #2809 (@technoweenie)
    • Run 1 TransferQueue per uploaded ref #2806 (@technoweenie)
    • Locks/verify: full refspec #2722 (@technoweenie)
    • send remote refspec for the other lock commands #2773 (@technoweenie)
  • Standardize progress meter output and implementation
    • tq: standardized progress meter formatting #2811 (@ttaylorr)
    • commands/fetch: unify formatting #2758 (@ttaylorr)
    • commands/prune: unify formatting #2757 (@ttaylorr)
    • progress: use git/githistory/log package for formatting #2732 (@ttaylorr)
    • progress: remove *progress.Meter #2762 (@ttaylorr)
    • tasklog: teach *Logger how to enqueue new *SimpleTask's #2767 (@ttaylorr)
    • progress: remove spinner.go #2759 (@ttaylorr)
  • Teach new flags, functionality to git lfs ls-files
    • commands: teach '--all' to git lfs ls-files #2796 (@ttaylorr)
    • commands/ls-files: show cached, tree-less LFS objects #2795 (@ttaylorr)
    • commands/ls-files: add --include, --exclude #2793 (@ttaylorr)
    • commands/ls-files: add '--size' flag #2764 (@ttaylorr)
  • Add new flags, functionality to git lfs migrate
    • commands/migrate: support ''-prefix refspec in arguments #2785 (@ttaylorr)
    • commands/migrate: add '--skip-fetch' for offline migrations #2738 (@ttaylorr)
    • git: prefer sending revisions over STDIN than arguments #2739 (@ttaylorr)
  • Release to new operating systems
    • release lfs for ubuntu/artful too #2704 (@technoweenie)
    • Adding Mint Sylvia to packagecloud.rb script #2829 (@yfronto)
  • New functionality in package lfsapi
    • NTLM authentication with SSPI on windows #2871 (@stffabi)
    • lfsapi/auth: teach DoWithAuth to respect http.extraHeaders #2733 (@ttaylorr)
    • add support for url-specific proxies #2651 (@technoweenie)
  • Code cleanup in git.Config, package localstorage
    • Tracked remote #2700 (@technoweenie)
    • Replace git.Config #2692 (@technoweenie)
    • Replace localstorage #2689 (@technoweenie)
    • Remove last global config #2687 (@technoweenie)
    • Git config refactor #2676 (@technoweenie)

Bugs

  • all: fix 32-bit alignment issues with sync/atomic #2883 (@ttaylorr)
  • all: memory alignment issues on 32-bit systems. #2880 (@jeffreydwalter)
  • command/migrate: don't migrate remote references in bare repositories #2769 (@ttaylorr)
  • commands/ls-files: behave correctly before initial commit #2794 (@ttaylorr)
  • commands/migrate: allow for ambiguous references in migrations #2734 (@ttaylorr)
  • commands: fill in missing printf arg #2678 (@technoweenie)
  • config: Add lfs.locksverify to safe keys. #2797 (@b4mboo)
  • don't replace pointers with objects if clean filter is not configured #2626 (@technoweenie)
  • fsck: attach a filter to exclude unfetched items from fsck #2847 (@larsxschneider)
  • git/githistory: copy entries from cache, elsewhere #2884 (@ttaylorr)
  • git/githistory: migrate annotated tags correctly #2780 (@ttaylorr)
  • git/odb: don't print extra newline after commit message #2784 (@ttaylorr)
  • git/odb: extract identifiers from commits verbatim #2751 (@wsprent)
  • git/odb: implement parsing for annotated *Tag's #2778 (@ttaylorr)
  • git/odb: retain newlines when parsing commit messages #2786 (@ttaylorr)
  • lfs: PointerScanner is nil after error, so don't close #2699 (@technoweenie)
  • lfsapi: Cred helper improvements #2695 (@technoweenie)
  • lfsapi: retry requests changing access from none IF Auth header is empty #2621 (@technoweenie)
  • prune: always prune excluded paths #2851 (@larsxschneider)
  • status: fix incorrect formatting with unpushed objects #2746 (@ttaylorr)
  • tasklog: don't drop updates in PercentageTask #2755 (@ttaylorr)
  • test: Fix integration test early exit #2735 (@technoweenie)
  • test: generate random repo names with fs-safe characters #2698 (@technoweenie)

Misc

  • all: Nitpicks #2821 (@technoweenie)
  • all: introduce package 'tlog' #2747 (@ttaylorr)
  • all: remove CLA #2870 (@MikeMcQuaid)
  • build: Specify the embedded Windows icon as part of versioninfo.json #2770 (@sschuberth)
  • config,test: Testlib no global config #2709 (@mathstuf)
  • config: add PushRemote() for checking branch.*.pushRemote and remote.pushDefault first #2715 (@technoweenie)
  • docs: Added documentation for git-lfs-ls-files' */- output. #2719 (@bilke)
  • docs: Uninstall man page improvements #2730 (@dpursehouse)
  • docs: Update usage info for post-checkout #2830 (@proinsias)
  • docs: add 'git lfs prune' to main man page #2849 (@larsxschneider)
  • docs: use consistent casing for Git #2850 (@larsxschneider)
  • git/githistory: have *RefUpdater hold *odb.ObjectDatabase reference #2779 (@ttaylorr)
  • progress: move CopyCallback (& related) to package 'tools' #2749 (@ttaylorr)
  • progress: move *progressLogger implementation to package 'tools' #2750 (@ttaylorr)
  • refspec docs #2820 (@technoweenie)
  • script/test: run 'go tool vet' during testing #2788 (@ttaylorr)
  • tasklog: introduce *SimpleTask #2756 (@ttaylorr)
  • test: Ignore comment attr lines #2708 (@mathstuf)
  • test: Wait longer for test lfs server to start. #2716 (@QuLogic)
  • test: ensure commented attr lines are ignored #2736 (@ttaylorr)
  • tools/humanize: add 'FormatByteRate' to format transfer speed #2810 (@ttaylorr)
  • vendor: update 'xeipuuv/gojsonpointer' #2846 (@ttaylorr)

Packages

Up to date packages are available on PackageCloud and Homebrew.

RPM RHEL 6/CentOS 6 RPM RHEL 7/CentOS 7 Debian 7 Debian 8 Debian 9

SHA-256 hashes:

git-lfs-freebsd-386-2.4.0.tar.gz 146227e9e7545f2fadc24756b99e96741ca6c679c9f4833728ed870ee9cea30b

git-lfs-freebsd-amd64-2.4.0.tar.gz ab2c3cc1924638e7cfb0615adf2cb38f58e4803abf4462dd778988bb42a3df02

git-lfs-linux-386-2.4.0.tar.gz cc2e44a0092e745ce4d3eb856c892a1e606dcf27698a5345a127bc5970085985

git-lfs-linux-amd64-2.4.0.tar.gz 56728ec9219c1a9339e1e6166f551459d74d300a29b51031851759cee4d7d710

git-lfs-windows-386-2.4.0.zip addc96bc4fac57090ef7ecb036778d38e0eb22c71d8926c02820f246b36ac4d6

git-lfs-windows-amd64-2.4.0.zip e3dec7cd1316ef3dc5f0e99161aa2fe77aea82e1dd57a74e3ecbb1e7e459b10e

git-lfs-windows-2.4.0.exe 345034fc91459579370737201e991c7a2e8acabbb24d15577ecf588d071b1949

git-lfs-darwin-386-2.4.0.tar.gz e6c35c4395efd9db45ab72c49ff19f807a722e964b15632ff378553d2fdf2708

git-lfs-darwin-amd64-2.4.0.tar.gz ab5a1391316aa9b4fd53fc6e1a2650580b543105429548bb991d6688511f2273

v2.3.4 v2.3.4

Features

  • 'git lfs install' updates filters with 'skip-smudge' option #2673 (@technoweenie)

Bugs

  • FastWalkGitRepo: limit number of concurrent goroutines #2672 (@technoweenie)
  • handle scenario where multiple configuration values exist in ~/.gitconfig #2659 (@shiftkey)

Packages

Up to date packages are available on PackageCloud and Homebrew.

RPM RHEL 6/CentOS 6 RPM RHEL 7/CentOS 7 Debian 7 Debian 8 Debian 9

SHA-256 hashes:

git-lfs-linux-386-2.3.4.tar.gz 4573675966c8cab19156530966ded4e5dd9fc0195b8e958e88475324976583f4

git-lfs-linux-amd64-2.3.4.tar.gz 6755e109a85ffd9a03aacc629ea4ab1cbb8e7d83e41bd1880bf44b41927f4cfe

git-lfs-darwin-386-2.3.4.tar.gz 57ca45c7c1734bfb51732cb058c28f6028b959c6e1675f8d4020aca019f9ca7b

git-lfs-darwin-amd64-2.3.4.tar.gz b16d4b7469b1fa34e0e27bedb1b77cc425b8d7903264854e5f18b0bc73576edb

git-lfs-freebsd-386-2.3.4.tar.gz 42a4c7269c85d5f1fa4cf6f6a4aca076385cc5915af3d30156e07874c0bd5400

git-lfs-freebsd-amd64-2.3.4.tar.gz 4684150deedf5509ffb5f67a54378cc582acaa25fbf3b378947c48023fd82ed2

git-lfs-windows-amd64-2.3.4.zip 18c47fd2806659e81a40fbd6f6b0598ea1802635ce04fb2317d75973450a3fe5

git-lfs-windows-386-2.3.4.zip b0738656064c79f878c17c62d2c4f6f3015fad7dc69d4a3c841ed1f7c93ec83d

git-lfs-windows-2.3.4.exe f11ee43eae6ae33c258418e6e4ee221eb87d2e98955c498f572efa7b607f9f9b

v2.3.3 v2.3.3

Bugs

  • invoke lfs for 'git update-index', fixing 'status' issues #2647 (@technoweenie)
  • cache http credential helper output by default #2648 (@technoweenie)

Packages

Up to date packages are available on PackageCloud and Homebrew.

RPM RHEL 6/CentOS 6 RPM RHEL 7/CentOS 7 Debian 7 Debian 8 Debian 9

SHA-256 hashes

git-lfs-darwin-386-2.3.3.tar.gz 45b8db57397d02733795529da09de868d8ead4bac07f51bbb728fe74affbc137

git-lfs-darwin-amd64-2.3.3.tar.gz 8b6a1b74396767a637f5c19ba4b115725dfe7ef2124f1162b71839d00071da2f

git-lfs-freebsd-386-2.3.3.tar.gz 8cfea48a1776343c9c2aa053221d6e70d051d3753df98f81866488008d49afa1

git-lfs-freebsd-amd64-2.3.3.tar.gz bea31be5625d61d4ced1f82b9ec9faf9056110fbdb01edfaab8e1e0c8f20b752

git-lfs-linux-386-2.3.3.tar.gz 9091d2dc444e57188ab3113540e415269ec5a6e17ee93d3f6afbf84d9914ddbd

git-lfs-linux-amd64-2.3.3.tar.gz d85e15f5871f1c0aa9e2f8e0abbbfe41c46757805adba2b48ee34430784a1b02

git-lfs-windows-2.3.3.exe 30d3a464222a0dd04b79cc2217c6cef46fcf3389994d37fba1b49e7fcf84b586

git-lfs-windows-386-2.3.3.zip ea1125ed47505482d2a9203f21f5dacc94f0cb329ec3b26f66c21c19a81c4fed

git-lfs-windows-amd64-2.3.3.zip b6e35d48570bfa25b81433b216ac942f819d171af31975cfe33748c95896ea1e

Other projects in Go