#git push doesn’t work

Alexander Ilves
Jul 23, 2023

--

You have tried to push your repository to remote, but you can’t so as getting error like this:

git push error messages

The cause of the problem is in: remote: error: GH001: Large files detected. You may want to try Git Large File Storage — https://git-lfs.github.com.

The problem has started in a new repository, and I by mistake forget to exlude .terraform directory from repository in my .gitignore fail. I have realized that directory is too large for git, but it was late. What I have tried to do:

I have tried to remove .terraform directory from local Work Directory

I have tried to use #git push origin master -force.

Solution:

# git filter-branch — tree-filter ‘rm -rf Terraform/.terraform/’ — prune-empty HEAD

--

--