Home > front end >  How can I push files over 4GB to GitHub (LFS) on Windows?
How can I push files over 4GB to GitHub (LFS) on Windows?

Time:02-23

I am trying to add files to my next git commit using

git add [filename]

The files have been set up to be tracked by Git Large File Storage (LFS). However, Git gives me the following error:

Encountered 1 file(s) that may not have been copied correctly on Windows:
        Models/PITA/id_vector.pkl

See: `git lfs help smudge` for more details.

When I run

git lfs help smudge

Git tells me:

git lfs smudge [<path>]
git lfs smudge --skip [<path>]

Read a Git LFS pointer file from standard input and write the contents
of the corresponding large file to standard output.  If needed,
download the file's contents from the Git LFS endpoint.  The <path>
argument, if provided, is only used for a progress bar.

Smudge is typically run by Git's smudge filter, configured by the repository's
Git attributes.

Options:

Without any options, git lfs smudge outputs the raw Git LFS content to
standard output.

* --skip:
    Skip automatic downloading of objects on clone or pull.

* GIT_LFS_SKIP_SMUDGE:
    Disables the smudging process. For more, see: git lfs config.

Known bugs
----------

On Windows, Git does not handle files in the working tree larger than 4
gigabytes.

For more information, see: https://github.com/git-lfs/git-lfs/issues

In other words, this is a known Windows bug. My question is, has anyone found a way around this?

CodePudding user response:

If you're using Git for Windows 2.34 or later, then this is already fixed, and the warning here is no longer accurate. It's been disabled in newer versions of Git LFS when using Git for Windows 2.34 or newer. You can just ignore it if you have an updated version of Git.

Note that this is a Git problem; Git LFS handles these just fine, and any reasonably recent version should work with a suitably updated Git. Additionally, Git on Unix has never had this problem and should work just fine.

  • Related