'Is it necessary to migrate repo history in Git-LFS?
I'm trying to move a large number of files in a Github repo to Git-LFS, but I'm fuzzy on how to use the migrate command. I've tracked all of my files, and pushed the changes to .gitattributes and all the files to the remote branch. But do I need to migrate before the process is complete?
I've done the following:
git lfs track "data/ground-truth/*.png" "data/ground-truth/*.tif" "data/ground-truth/*.gt.txt"
git add .gitattributes
git commit -m "Tracked ground-truth files with LFS."
git rm --cached "data/ground-truth/*.png" "data/ground-truth/*.tif" "data/ground-truth/*.gt.txt"
git add "data/ground-truth/*.png" "data/ground-truth/*.tif" "data/ground-truth/*.gt.txt"
git commit -m "Converted all tracked files to LFS."
git push
A few tutorials I've read say that this is the way to do it, while others say that the process isn't done until I migrate. But I can't find a satisfactory answer as to what migrating is and when I need to do it.
When experimenting, I ran:
git lfs migrate import --include="data/ground-truth/*.png,data/ground-truth/*.tif,data/ground-truth/*.gt.txt"
This doesn't seem to have any effect, according to git status. But when I add the option --include-ref with my branch, it diverges from the remote branch and I have to force a push. I don't want to do this if it's not necessary.
So is it necessary? Or is it sufficient to perform the initial steps I took to successfully move my files to LFS?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
