I am trying to git push --all
and it just hangs on writing objects
10.0-final-project git:(master) ✗ git push --all
Counting objects: 134, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (129/129), done.
Writing objects: 32% (44/134), 321.56 MiB | 231.00 KiB/s
The 321.56 MiB and 231.00 KiB/s continues to go up.
I have tried using git config --global http.postBuffer
and git config --global sendpack.sideband false
Nothing is working. What is the way to resolve this issue?
If git push origin master not working , all you need to do is edit that file with your favourite editor and change the URL = setting to your new location. Assuming the new repository is correctly set up and you have your URL right, you'll easily be able to push and pull to and from your new remote location.
If you are starting a new project from a clone, (from the CLI without a fork) when you push to a blank remote you are pushing the entire history of the project you just cloned. This is going to take some time.
What does “Enumerating objects” mean? When you create a new repo, the first push collects all objects and sends them in a single pack-file to the remote. This is essentially the same operation as a git clone, but in reverse.
Whenever we need to push the changes to a remote repository, we use git push along with the remote repository “origin” and “master” branches. The term used is “git push origin master“. To pull the changes from the remote repository to local, we use git pull along with remote repository “origin” and “master” branch.
Looks like you have added a HUGE binary files or folder to GIT.
Its not something you should do with git.
If this is the case consider solutions like: Git Large File Storage
Another relative article can be found here with some sample code for cleaning the repo.
We need to search through all of the history to find the files that are good candidates for deletion. As far as I can tell, this is nontrivial, so here is a complicated command that lists the sum of the sizes of all revisions of files that are over a million bytes. Run it on a mac.
git rev-list master | while read rev; do git ls-tree -lr $rev | cut -c54- | grep -v '^ '; done | sort -u | perl -e '
while (<>) {
chomp;
@stuff=split("\t");
$sums{$stuff[1]} += $stuff[0];
}
print "$sums{$_} $_\n" for (keys %sums);
' | sort -rn >> large_files.txt
This is the fun part. If large_files.txt is still in the same format as before, do this:
git filter-branch --tree-filter 'rm -rf `cat /full/path/to/large_files.txt |
cut -d " " -f 2` ' --prune-empty <BRANCHES>
I got the same problem. But the cause was the current user didn't have write permission to the destination dir.
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