Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git push hangs and does nothing

Tags:

git-push

I'm new to git and testing it out. I've been able to clone a friends repository make small local changes and commit.

I'd like to now test pushing my local changes to the remote repository but unfortunately when I try to do a push

$ git push <my friends remote repository>
<---- hangs here waiting ..I break out by ctr-c

Here is some info showing my current status,

$ git remote show origin
Fetch URL: git://codaset.com/nickbmarine/nickspix.git
Push URL: git://codaset.com/nickbmarine/nickspix.git
HEAD branch: master
Remote branches:
Refactor tracked
master tracked
Local branch configured for 'git pull':
master merges with remote master
Local ref configured for 'git push':
master pushes to master (fast-forwardable)

Any idea's?

like image 529
coderdave Avatar asked Sep 27 '10 08:09

coderdave


People also ask

Why my git push is not working?

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.

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 .

How do I force a git push?

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).

What is verbose in git?

Today I want to talk about a little-know flag for the git commit command that I think will help you create better commits: -v , also known as --verbose . Use this flag and Git will include the diff of the changes at the bottom of the commit message template: I think this is helpful for a couple of reasons.


2 Answers

Try pushing to git using http:// instead git://. If it works this way probably your router is blocking the git port.

like image 127
Michael Barton Avatar answered Sep 18 '22 13:09

Michael Barton


I had this exact same problem when running GIT from a command prompt (Win 8.1) within a VirtualBox. I found that if you simply press a key on the keyboard that you will be prompted for your username, and then all is ok. It seems that the prompt was stuck, awaiting keyboard input.

like image 25
NateP Avatar answered Sep 19 '22 13:09

NateP