I installed lfs on my bare repo, but now I can't track any files. When I run git lfs track '*.png'
I get this error This operation must be run in a work tree
. From what I understand this happens because this repo doesn't have a working directory. How am I supposed to choose which files should be tracked? Should I do it in the clone of this repo? This seems problematic as I will have to do it every time I clone it.
Asked
Active
Viewed 382 times
0

Wojtek Wencel
- 2,257
- 6
- 31
- 65
-
Consider cloning the bare repo elsewhere first. – evolutionxbox Jul 10 '18 at 23:27
-
I already did. I get this error when i try to push to the bare repo fom the cloned one. – Wojtek Wencel Jul 11 '18 at 10:40
-
I don't understand your comment. Clone the repo (don't use `--bare` for the clone), and push to the bare repo when done. The bare repo doesn't need a work tree. – evolutionxbox Jul 11 '18 at 10:44
-
That's exactly what I do, and then I get this error. – Wojtek Wencel Jul 11 '18 at 10:48