简体   繁体   中英

How to add lfs support to this git setup?

I've set up my git repos like this: a bare repo on my HDD and a clone of it on my SSD. The bare repo is acting as a backup. Now I want to add lfs support to it and can't figure out how. I tried doing this in the clone repo:

git lfs install
git lfs track '*.png'

Now I create test.png in that directory.

git add .
git commit -m "added png file"
git push origin master

After running the last line I get this error:

Remote "origin" does not support the LFS locking API. Consider disabling it with:
$ git config lfs.D:/Git/test.git/info/lfs.locksverify false
batch request: missing protocol: "D:/Git/test.git/info/lfs"
error: failed to push some refs to 'D:/Git/test.git'

Doing git config lfs.D:/Git/test.git/info/lfs.locksverify false doesn't help. I think I'm misunderstanding how lfs sould be set up, but I couldn't find any tutorials on how to do it locally. I'm also not sure if it can even work without a server for lfs cache. Any help on how to set this up would be appreciated!

Although this problem is older, my answer may help people still serching for such issue:

I had exactly the same problem. Then I saw that LFS is not enabled in the remote project that I cloned locally. After enbling , it seemed still not to work. But I had only to clone (again) after enabling... pushing lfs files worked.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM