Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does a "git push" just hang there indefinitely using MySysGit 1.7.4?

Tags:

git

I tried small experiments with Ruby and Rails, and would like to push and pull from the Mac to PC and vice verse.

So I installed what the Git's website's standard recommended Git on PC (MySysGit 1.7.4), and run

git daemon --reuseaddr --base-path=. --export-all --verbose --enable=receive-pack 

either on the Mac or PC (to start a Git server), and then, on the PC, I cloned and add a file, and commit, and then do a

git push git://192.168.1.31/ master 

now it will print out the following and just hang there indefinitely:

Counting objects: 5, done. Delta compression using up to 8 threads. Compressing objects: 100% (3/3), done. Writing objects: 100% (4/4) 

I tried it on another PC, and it is the same thing. How can this be fixed?

(I am using the command to run the server from question: 'receive-pack': service not enabled for './.git')

like image 453
nonopolarity Avatar asked Apr 02 '11 00:04

nonopolarity


People also ask

Why is git push taking so long?

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. If you just need the clone as it stands and you don't want the history, delete the .

Why git push does not work?

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.

How do I stop git push?

If you have an upstream repo in addition to origin then you can do the following to make sure you can't push to upstream: git remote set-url --push upstream no_push . Check the effect with git remote -v before and after the change.

Is it safe to git push?

It is no secret that git push --force is dangerous. Without question, it will replace the remote with your local changes—and it won't stop to check if that will override any changes pushed up to remote in the process. When working in a shared repository, this spells danger for even the most careful developer team.


1 Answers

They have just released a version that allows a config option to stop git hanging.

Fix is for https://github.com/msysgit/git/issues/101 in release https://github.com/msysgit/msysgit/releases/tag/Git-1.9.4-preview20140611

You can fix it by setting

git config --global sendpack.sideband false 
like image 95
Adrian Cornish Avatar answered Oct 14 '22 16:10

Adrian Cornish