As some *.jpg
files already tracked by git,then git lfs track '*.jpg'
cannot track those files.
How to make those *.jpg
free from git HEAD(latest status)?
Asked
Active
Viewed 119 times
1 Answers
2
As detailed in "Moving a file in your repository to Git Large File Storage"
If you've set up Git LFS, and you have an existing file in your repository that needs to be tracked in Git LFS, you need to first remove it from your repository.
- Remove the file from the repository's Git history using either the
filter-branch
command or BFG Repo-Cleaner.
For detailed information on using these, see "Removing sensitive data from a repository."- Configure tracking for your file and push it to Git LFS. For more information on this procedure, see "Configuring Git Large File Storage."
- you can remove files based on wildcard with
git filter-branch
, or with BFG repo cleaner. - you can track multiple files in one command with lfs

VonC
- 1,262,500
- 529
- 4,410
- 5,250
-
I have read this post,but it's for single file.This question refer to `*.jpg`. – kittygirl Jan 08 '19 at 05:51
-
Finally, I give up `git lfs`,too many risks,waste my several days. – kittygirl Jan 08 '19 at 07:13
-
@kittygirl I was commuting to work. I have now edited the answer. – VonC Jan 08 '19 at 07:48