Git Push -> Can't push, because no remotes are defined

I have existing local project that I want to push to a brand new empty remote git repo. I go to VCS -> Git -> Push ... but I get this error:

"Can't push, because no remotes are defined"

Well, sure, I did not define the remote repo BECUASE THERE IS NO PLACE WHERE I COULD DEFINE IT!!!! (Omg what kind of usability is this? Who created this workflow? Come on, seriously?)

It seems that I am not the only one who has this problem: http://stackoverflow.com/questions/13585870/pushing-to-git-from-webstorm or http://devnet.jetbrains.com/thread/435725 but I didn't find any answer.

Please please please help!

But please, if your advice contains something like "yeah just type -git -repo- & repo -local % -git -repo # -repo git git" PLEASE tell me exactly where should I type that and how do I get there. In other words I am not big friend with this usability nightmare called command line tool and I don't understand how to use any of it.

Thanks :)

2 comments

It's not currently possible to do this from the IDE - see http://youtrack.jetbrains.com/issue/IDEA-87099
The solution is mentioned in description: "Just run "git remote add origin https://repo" in terminal solve this problem."

0

I also got this error when I deleted the repository on git as I wanted to start from scratch by committing my code again. The following run from the Terminal window in WebStorm fixed it:

git remote add origin https://github.com/myusername/myrepositoryname.git
git push -u origin master

0

Please sign in to leave a comment.