Skip to content

Instantly share code, notes, and snippets.

@sanzgiri
Last active January 17, 2020 23:51
Show Gist options
  • Select an option

  • Save sanzgiri/d6732e171a0ffc4be65aafdeda40f050 to your computer and use it in GitHub Desktop.

Select an option

Save sanzgiri/d6732e171a0ffc4be65aafdeda40f050 to your computer and use it in GitHub Desktop.
Removing a large file from git repo and adding via LFS
git filter-branch --tree-filter 'rm -rf </path/to/large_file' HEAD
git commit -m "removing large file"
git push origin master

curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
sudo apt-get install git-lfs
git lfs install
git lfs track </path/to/large_file>
git commit -m "adding large file" .
git push origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment