Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

fatal: No configured push destination

Tags:

git

github

Please see following screen details - git remote -v command is showing that I have test_vishwas added but when I am giving Push command it is giving error. Anybody can help ?

C:\Users\vishwas_gupta03\Documents\GitHub\test_Vishwas [master]> git remote -v github  https://github.com/vishwasjione/test_Vishwas.git (fetch) github  https://github.com/vishwasjione/test_Vishwas.git (push) origin C:\Users\vishwas_gupta03\Documents\GitHub\test_Vishwas [master]> git push fatal: No configured push destination. Either specify the URL from the command-line or configure a remote repository us ing      git remote add <name> <url>  and then push using the remote name      git push <name>  C:\Users\vishwas_gupta03\Documents\GitHub\test_Vishwas [master]> 
like image 997
VGupta Avatar asked Jan 12 '14 08:01

VGupta


People also ask

How do I set a push destination?

Run the git remote set-url --add --push origin git-repository-name command where git-repository-name is the URL and name of the Git repository where you want to host your code. This changes the push destination of origin to that Git repository.

How do I push master branch to remote repository?

Push a new Git branch to a remote repo Clone the remote Git repo locally. Create a new branch with the branch, switch or checkout commands. Perform a git push with the –set-upstream option to set the remote repo for the new branch. Continue to perform Git commits locally on the new branch.

How do I push code to GitHub?

In the command line, navigate to the root directory of your project. Initialize the local directory as a Git repository. To create a repository for your project on GitHub, use the gh repo create subcommand. When prompted, select Push an existing local repository to GitHub and enter the desired name for your repository.


1 Answers

Try this:

git push -u github master

This will set your local master branch to track the master branch on the github remote.

Next time you push this branch, you should be able to use the shorter command git push.

like image 62
johndbritton Avatar answered Sep 30 '22 04:09

johndbritton