I am running git daemon with the following command.
c:\cygwin\bin\git daemon --reuseaddr --base-path=/cygdrive/S --export-all --verbose --enable=receive-pack
I am able to clone and pull updates but when I try to push I get
$ git push origin master
Counting objects: 6, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (6/6)
, then it hangs
I am currently using git version 1.7.0.4
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.
A commit gets rejected and causes a failed to push some refs to error because the remote branch contains code that you do not have locally. What this means is that your local git repository is not compatible with the remote origin.
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 .
To force a push to only one branch, use a + in front of the refspec to push (e.g git push origin +master to force a push to the master branch). See the <refspec>... section above for details. Force an update only if the tip of the remote-tracking ref has been integrated locally.
I had the same (similar?) problem with cygwin git. After one cygwin's update it stopped working properly with remote git repos, both on linux and cygwin.
At first it looked random and was hard to identify. Some commands worked, some failed. It looks like it was connected to the size of data being transferred.
I believe it's a client-side problem with SSH in cygwin as other git clients can connect normally. For me solution was to install msysgit and choose at install its own SSH client, not cygwin's. Putty should work as well, I guess.
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