Keep getting an error when I try to push a directory with Terraform files into a remote GitHub Repo [duplicate] - github

This question already has answers here:
Issues with pushing large files through Git
(7 answers)
What is the storage mechanism behind Git Large File Storage?
(1 answer)
Closed 12 months ago.
On a local GitHub repo, I have a directory called "s3" that contains a Terraform file for creating an AWS S3 Bucket remotely. When I try pushing the directory onto my remote repo, I keep getting this error.
$ git push origin repo
Uploading LFS objects: 100% (1/1), 1.3 KB | 0 B/s, done.
Enumerating objects: 22, done.
Counting objects: 100% (22/22), done.
Delta compression using up to 12 threads
Compressing objects: 100% (15/15), done.
Writing objects: 100% (21/21), 50.31 MiB | 1.12 MiB/s, done.
Total 21 (delta 4), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (4/4), completed with 1 local object.
remote: error: Trace: 2bcd19423f0176b3048b9144f26779fab7c903f263a60b8534632e7c697ec700
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File s3/.terraform/providers/registry.terraform.io/hashicorp/aws/3.74.3/windows_amd64/terraform-provider-aws_v3.74.3_x5.exe is 244.70 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
To github.com:User/Remote-Repo.git
! [remote rejected] repo -> repo (pre-receive hook declined)
error: failed to push some refs to 'github.com:User/Remote-Repo.git'
I have git lfs installed which should help with pushing files with large sizes, but it isn't.
What am I doing wrong?
Note: Some names in the error have been edited for privacy/security.

Related

Git Bad Object desktop.ini

I used to have GoogleDrive on my PC that uploaded all my code on the drive. I was working on the main branch because I got this project on GitHub, so I deleted all the desktop.ini files and tried to pull the project to update the changes made by my co-workers, but got this error.
The problem didn't occur to me at first because GoogleDrive takes a few minutes to make all the desktop.ini, but when it did it caused problems.
> git pull pmo main
remote: Enumerating objects: 85, done.
remote: Counting objects: 100% (77/77), done.
remote: Compressing objects: 100% (33/33), done.
remote: Total 59 (delta 25), reused 59 (delta 25), pack-reused 0
Unpacking objects: 100% (59/59), 6.63 KiB | 218.00 KiB/s, done.
fatal: bad object refs/desktop.ini
error: https://github.com/*******/*******.git did not send all necessary objects
I tried to remove the .git/refs/desktop.ini with the command rm but it says that i do not have access to it, even in the powershell.
That is why it is preferable to not work in a network-synchronized drive: git pull/push/clone won't work well with the concurrent synchronization that comes with a Google drive.
It is better to save on that drive a git bundle (which stores your repository in one file), while collaborating with other through the remote GitHub repository (cloned locally in a normal folder)

I am not able to push the code changes on github pages?

I have deployed the code once on github using github pages and now i have maked the changes in some of the code and now i am not able to push the code .I deleted the all branches and code on repo and did the process once again but still on live website i am not getting any changes .
PS D:\VJTI_Racing_Website_2.0\frontend> git add .
>> git commit -m "updated"
>> git push origin master
On branch gh-pages
nothing to commit, working tree clean
Enumerating objects: 26890, done.
Counting objects: 100% (26890/26890), done.
Delta compression using up to 8 threads
Compressing objects: 100% (21199/21199), done.
Writing objects: 100% (26890/26890), 779.96 MiB | 1.96 MiB/s, done.
Total 26890 (delta 4725), reused 26890 (delta 4725), pack-reused 0
remote: Resolving deltas: 100% (4725/4725), done.
remote: warning: File node_modules/.cache/default-development/3.pack is 52.95 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB
remote: error: Trace: d119776a9de8bb6b95dccf52e4031387455d238a7a7367d558a094750a2328de
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File node_modules/.cache/default-development/0.pack is 490.10 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
To https://github.com/vjtiracing/VJTI_Racing_Website_2.0.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/vjtiracing/VJTI_Racing_Website_2.0.git'
the error showing is of large file but I deleted the node modules file and also cleared the cache please someone help me out here.

i have pushed my website locally on github after creating an empty repository but the repository is still blank

I have a folder with codes, i pushed it on github after creating a repository but the process was successful but i can not see any file in the repository, any help guys, this is my cli codes
SydoTech#DESKTOP-PUHK97G MINGW64 /d/james/ict-specialists (master)
$ git remote add origin https://github.com/Kato669/ict-specialist-website.git
SydoTech#DESKTOP-PUHK97G MINGW64 /d/james/ict-specialists (master)
$ git push origin main
error: src refspec main does not match any
error: failed to push some refs to 'https://github.com/Kato669/ict-specialist-website.git'
SydoTech#DESKTOP-PUHK97G MINGW64 /d/james/ict-specialists (master)
$ git push origin master
Enumerating objects: 1383, done.
Counting objects: 100% (1383/1383), done.
Delta compression using up to 4 threads
Compressing objects: 100% (1380/1380), done.
error: RPC failed; curl 92 HTTP/2 stream 0 was not closed cleanly: CANCEL (err 8)
send-pack: unexpected disconnect while reading sideband packet
Writing objects: 100% (1383/1383), 35.93 MiB | 323.00 KiB/s, done.
Total 1383 (delta 181), reused 0 (delta 0), pack-reused 0
fatal: the remote end hung up unexpectedly
Everything up-to-date
SydoTech#DESKTOP-PUHK97G MINGW64 /d/james/ict-specialists (master)
$

Persistent large file error on `git push` even after large file is removed

I accidently tried to push a large file to git and I got the following error message:
=Counting objects: 1565, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (1559/1559), done.
Writing objects: 100% (1565/1565), 142.13 MiB | 3.95 MiB/s, done.
Total 1565 (delta 1212), reused 2 (delta 0)
remote: Resolving deltas: 100% (1212/1212), completed with 11 local objects.
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: error: Trace: e3e1d72efbc7d183eda3ef58d3ef93ad
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File pycotools/Examples/Fit1Dir/smad7_not_reproduced_alternative/file.csv is 1607.96 MB; this exceeds GitHub's file size limit of 100.00 MB
To https://github.com/CiaranWelsh/PyCoTools.git
! [remote rejected] CopasiVersion19 -> CopasiVersion19 (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/CiaranWelsh/PyCoTools.git'
I have since remove this file from both of my branches but I still keep getting the same error and therefore can't push any of my code. Does anybody have any ideas on what to do here?
update
Following a suggestion in comments
$ git rm --cached /Examples/Fit1Dir/smad7_not_reproduced_alternative/file.csv
produces:
fatal: pathspec 'pycotools/Examples/Fit1Dir/smad7_not_reproduced_alternative/file.csv' did not match any files

xcdatamodel history causing git push errors

I have enabled history for xcdatamodel file.From the xcode it appears to be one file
from terminal its a set of folders
my.xcdatamodeld/
my 2.xcdatamodel
my.xcdatamodel
I am unable to deliver this to my remote git repository due to this error
indmacsunelama$ git push
Counting objects: 19, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (13/13), done.
Writing objects: 100% (14/14), 34.11 KiB, done.
Total 14 (delta 5), reused 7 (delta 1)
remote: usage: git cat-file (-t|-s|-e|-p|<type>|--textconv) <object>
remote: or: git cat-file (--batch|--batch-check) < <list_of_objects>
remote: <type> can be one of: blob, tree, commit, tag
remote: -t show object type
remote: -s show object size
remote: -e exit with zero when there's no error
remote: -p pretty-print object's content
remote: --textconv for blob objects, run textconv on object's content
remote: --batch show info and content of object standard input
remote: --batch-check show info about objects fed from the standard input
remote: error: hook declined to update refs/heads/master
To git://mylinuxbox.us.spec.com/mobile.git
! [remote rejected] master -> master (hook declined)
error: failed to push some refs to 'git://mylinuxbox.us.spec.com/mobile.git'
Those errors indicate that you have a buggy hook installed in your remote repository. Check the hooks subdirectory in mobile.git on your remote server and look at the hooks that are enabled. It seems that the hook is misusing git cat-file at some point.