How to clone git without/ignore lfs files

Spread the love

Sometimes, especially if the link to LFS is broken or the repository has been moved, it becomes necessary to clone the repository while ignoring LFS.

For clone repository without LFS in Linux need to add GIT_LFS_SKIP_SMUDGE=1 before git clone command.
Example: GIT_LFS_SKIP_SMUDGE=1 git clone your_repository

For Windows in PowerShell: $env:GIT_LFS_SKIP_SMUDGE=1 git clone your_repository

Leave a Reply