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?
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. 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).
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.
Try pushing to git using http:// instead git://. If it works this way probably your router is blocking the git port.
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.
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