admin管理员组文章数量:1122846
I recently started using Git LFS and followed the documentation, which states that only new files matching the tracked patterns will be stored with Git LFS. To include existing files, the documentation mentions using git lfs migrate.
Here’s what I did:
Installed Git LFS and tracked these pattern:
git lfs track "*.jpg"
Ran git add -A and noticed older files in the staging area. Committed and pushed to the main repository. When I checked GitHub, older files already in the repository were marked as 'Stored with Git LFS', even though I didn’t run git lfs migrate.
My understanding was that older files wouldn’t be affected unless migrated. So my question is:
- How could older files already be stored with Git LFS if migration wasn’t performed?
- Is the documentation incorrect or am I misunderstanding how Git LFS handles old files?
Thanks for any clarification!
I recently started using Git LFS and followed the documentation, which states that only new files matching the tracked patterns will be stored with Git LFS. To include existing files, the documentation mentions using git lfs migrate.
Here’s what I did:
Installed Git LFS and tracked these pattern:
git lfs track "*.jpg"
Ran git add -A and noticed older files in the staging area. Committed and pushed to the main repository. When I checked GitHub, older files already in the repository were marked as 'Stored with Git LFS', even though I didn’t run git lfs migrate.
My understanding was that older files wouldn’t be affected unless migrated. So my question is:
- How could older files already be stored with Git LFS if migration wasn’t performed?
- Is the documentation incorrect or am I misunderstanding how Git LFS handles old files?
Thanks for any clarification!
Share Improve this question asked Nov 22, 2024 at 12:02 ArtoriasArtorias 32 bronze badges 1- GitHub may simply be misrepresenting historical commits as if current attributes applied. – jthill Commented Nov 23, 2024 at 21:33
1 Answer
Reset to default 0Looks like older files were handled by Git LFS
because they were staged and committed after the .gitattributes
update.
Migration (git lfs migrate) is only required for files already committed in previous history. The behavior is normal according to the Git LFS
documentation.
Link: CLICK
本文标签: git lfsWhy are old files automatically stored with Git LFS without migrationStack Overflow
版权声明:本文标题:git lfs - Why are old files automatically stored with Git LFS without migration? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736303877a1932035.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论