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: or 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 :)

Comment actions Permalink

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

Comment actions Permalink

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
git push -u origin master


Please sign in to leave a comment.