i used git before without any problem, but suddenly i can't push or clone anything.
when i use this command, just nothing happens, not even an error, so i have to press ctrl + c or just close git window.
i use this simple command for pushing:
git push origin master
also tried with -u parameter.
so what i can do to solve this?
Update:
i installed a fresh win xp on virtual machine and test to push something, same result as before, so may be my internet connection have some problem.
any idea?
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. Based on the above, your local machine is missing commits C and D.
The git push command is used to upload local repository content to a remote repository. Pushing is how you transfer commits from your local repository to a remote repo. It's the counterpart to git fetch , but whereas fetching imports commits to local branches, pushing exports commits to remote branches.
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).
Update 2021: this is again an issue, when pushing with HTTPS URL, with Git 2.32 (June 2021).
See details here: there is a bug with the Microsoft Git Credential Manager Core, which is why, as Pinak Ganguly suggests, you might want to switch temporarely to the obsolete Git Credential Manager:
git config --global credential.helper manager
First, there was some issue with ssh access recently:
We are currently investigating SSH access problems on one of our fileserver pairs. A small number of repositories may be affected.
Second, you would need to try and use https, not http:
git remote set-url origin https://github.com/username/reponame
Third, the git push -u origin master
is only for the first push (after that, git push
alone is enough: see "Why do I need to explicitly push a new branch?" for more)
If the push or clone issue still persists, then you need to contact GitHub support to know more about this.
Here is a little out of the box thinking.
Do you have a VPN on?
It is amazing how many times just turning things off then on has helped at times, sometimes things just get stuck and need a "power start" may it serve you as well too.
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