I'm trying to add everything under MyProject/Frameworks/
to git-lfs (large file storage). I'm not sure what the proper format for matching all files and folders recursively under the Frameworks
folder is. This answer says the proper format is git lfs track "MyProject/Frameworks/**"
, but Atlassian's help document says I should use git lfs track "MyProject/Frameworks/"
. I tried both and they didn't use git lfs
for storage. It tried uploading files directly.
Sure, I'd love to know the proper format, but more importantly, before I attempt to push my changes to github, I'd like to verify that the match and files do indeed work correctly. This'll allow me to iterate and try new things.
I see two related commands that might help: git lfs status
and git lfs ls-files
. It's not clear which one I should be using and what output I should be looking for. For example, when I ran git lfs status
, it showed me a ton of files under Git LFS objects to be committed
, making me think they would be added to Git LFS. However, after attempting to push to GitHub.com, I realized that it was clearly not the case. If it helps, the output for these files always had something like (Git: edee1ad)
after each file name.
When I attempt to use git lfs ls-files
I'm not sure if I need to run it after git add
ing the files, after committing them, or after pushing them. Most of the time it's just showing me blank output.
Essentially the question is: If I configured git lfs
correctly, what tool (e.g. git lfs status
) should I use, and what output should I look for before I attempt to commit/push?
Note: Please don't answer the question with only how to match all recursive files as that will help me once (this specific case), rather than allowing me to iterate and try new things (any case).
question from:
https://stackoverflow.com/questions/54451856/how-can-i-tell-if-a-file-will-be-uploaded-to-git-lfs-correctly 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…