I'm trying to push an xlsx file to a remote repository using git LFS.
I've tried two ways: Using Sourcetree click-thru menus and using the terminal server. Both result in the same error message.
I set up a remote repo in Bitbucket and set the Allow LFS option. I cloned the empty repo to a local file location.
In Sourcetree, I used Repository/Git LFS/Initizalise repo. This gave me a click-thru menu to set up a gitattributes file, which I set to allow xlsx files (*.xlsx) . I committed and pushed the gitattributes file which was automatically created. Then I moved the Excel file into the local folder, committed, and tried to push.
In the terminal window, I used much the same approach--cloning the empty remote repo, then doing git lfs install, git lfs track "*.xlsx", committing and pushing the gitattributes file, and then adding and committing the Excel file.
When I tried to push in either Sourcetree or using the terminal, I got the same error message:
Uploading LFS objects: 0% (0/1), 0 B | 0 B/s, done
Fatal error: null
error: failed to push some refs to 'remote_repo_location'
git clone remote_repo
cd remote_repo
git init
git lfs install
git lfs track "*.xlsx"
git add -A
git commit -m "test"
git push origin master
(this works fine and puts the gitattributes file in my remote repo)
Then I physically copy the Excel file into the folder and do this:
git add -A
git commit -m "test2"
git push origin master
This causes the error message
Here's the steps you can try:
$ git lfs status
$ git lfs fetch --all
$ git config --global lfs.allowincompletepush true
$ git lfs push --all origin master
$ git lfs pull
$ git push
$ git push -f --no-verify
NOTE: DO NOT PUSH ON A VPN NOR A PROXY
I hit this problem with BitBucket, and the solution was
git config --global lfs.contenttype 0
I got the idea from this thread.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With