Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable Git LFS for a remote

Tags:

git

git-lfs

I'm trying to push to a second remote that doesn't support Git LFS. Is there a way to disable Git LFS for a specific remote using git config?

like image 896
amiuhle Avatar asked Apr 14 '16 14:04

amiuhle


People also ask

Does git LFS work with SSH?

SSH. If Git LFS detects an SSH remote, it will run the git-lfs-authenticate command. This allows supporting Git servers to give the Git LFS client alternative authentication so the user does not have to setup a git credential helper. The user , server , and path properties are taken from the SSH remote.

What is git LFS prune?

DESCRIPTION. Deletes local copies of LFS files which are old, thus freeing up disk space. Prune operates by enumerating all the locally stored objects, and then deleting any which are not referenced by at least ONE of the following: ○ the current checkout.


1 Answers

The workaround given by amiuhle works fine for me:

git push --no-verify 

It prevents the pre-push hook of git lfs from trying to upload the files. So link-files are committed, but the actual binaries are missing.

like image 128
Christian Avatar answered Oct 03 '22 05:10

Christian