Last active
February 6, 2020 23:52
-
-
Save wcarhart/faf8404f4791f3e6918628b9366d2e7f to your computer and use it in GitHub Desktop.
Initialize Git LFS and start tracking files with it
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Initialize Git LFS and start tracking files with it | |
## Install Git LFS (MacOS) | |
brew install git-lfs | |
## Change to repository | |
cd $PROJECT_REPO | |
## If you've already added or committed the file(s) you'd like to track with LFS, | |
## you'll need to edit them out of the Git history. See: | |
## https://gist.github.com/wcarhart/0c8106fbff33e747400cf7a6edcb2847 | |
## Initialize Git LFS | |
git lfs install | |
## Track desired file | |
git lfs track $VERY_BIG_FILE | |
## Add .gitattributes to history | |
git add .gitattributes | |
## Continue as normal | |
git add -A | |
git commit -m "Initialized LFS" | |
git push |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment