How to add a remote to a repository with lfs?

匿名 (未验证) 提交于 2019-12-03 01:35:01

问题:

I'm trying to set up something like this: a bare repo on my HDD drive and a clone of it on my SSD with lfs installed. I'm doing it like this:

First I set up a bare repo on my HDD:

mkdir git_lfs_test.git cd git_lfs_test.git git init --bare 

And then on my SSD:

git clone D:/Git/git_lfs_test.git cd git_lfs_test git lfs install git lfs track '*.png' 

After doing this I open the cloned repo in GitKraken. I make the initial commit and then commit and push the .gitattributes file. Then I create a png file (which GitKraken recognises as a lfs file) and push it to the origin. It throws this error:

Remote "origin" does not support the LFS locking API. Consider disabling it with: $ git config lfs.D:/Git/git_lfs_test.git/info/lfs.locksverify false batch request: missing protocol: "D:/Git/git_lfs_test.git/info/lfs" exit 

After running the line of code it suggests I still get the same error.

I'm new to git so I'm probalby making some obvious mistake, but I can't figure out what it is.

Also I want to set up my lfs cache so it is on the HDD so any help on that would be great.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!