Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Lfs detection inconsistent when manually modify .gitattributes file #1848
I meet a similar problem with #1057(which had been solved by #1104), the different between #1057 is I didn't use
After this series of commands,
I clone the project descriped above with two git-lfs version.
Thanks for opening this. Since you added the binary file _before_ changing your `.gittatributes`, Git didn't know to run the LFS filter, which means the file didn't get converted to a pointer. Since the file exists in your history as a large binary object, but is marked in your `.gitattributes` as having been tracked by LFS, LFS gets confused when it tries to parse a pointer that it thinks it's tracking, but really is not. I'm on board with @technoweenie's ideas here, but this command can help you fix your repository's history in the meantime: ```sh $ git filter-branch -f --prune-empty \ --tree-filter ' git rm --cached -r -q . git lfs track "*.bin" git add . ' --tag-name-filter cat -- --all ```