From Bonus Bits
Jump to: navigation, search


This article gives common command example for using the Github Git Large File System or LFS add-on. supports this LFS sub-filesystem. So you can push binaries in your projects to GitHub using this add-on and the binaries will be stored in their LFS sub-system.


Track Binaries in Project

You have to specify which files or file types to track with LFS. Either manually edit the .gitmodules file or use the following command example and it will create/update the .gitmodules file for you.

git lfs track "*.tgz"
git lfs track "*.rpm"
git lfs track "*.jar"

Add & Commit

Example from root of project:

git add .gitattributes
git add path/if/not/root/packagename.rpm
git commit -m "add rpm"

List Tracked LFS Files or if have setup on an internal Github Enterprise.

git lfs ls-files

Push to Github or if have setup on an internal Github Enterprise.

git push origin master

Download LFS File/s Locally

  1. First Clone the repository locally
  2. Then from the root of the cloned repo where there is a .gitmodules file use the following command to download the binaries.
    git lfs pull

Related Articles