Nafiul Islam
Nafiul Islam

Reputation: 82470

IntelliJ IDEA Bitbucket Git integration not pushing

I initiated my git repo in my IntelliJ IDEA project. Then I click on share via Bitbucket under "Import into Version Control" Note: I've installed the plugin from jetbrains repository.

All works fine, I even am able to create the repo on Bitbucket, but when I try to push, nothing happens. When I try again through VCS > GIT > Push, it says that there are no remotes defined.

Please help. I mean, there's no error message nothing. I manage to push to github just fine though.

Upvotes: 9

Views: 15022

Answers (4)

loler
loler

Reputation: 2587

You've to create repo on Bitbucket, then change existing remote repository URL from Intellij Terminal:

> git remote set-url origin https://<username>@bitbucket.org/<owner>/<newrepo>

And push with git push.

Upvotes: 0

arvindwill
arvindwill

Reputation: 1992

Actually problem is intellj plugin has some problem in adding remote to repo when it was shared via plugin, so it is mandatory to add the remote manually It is not necessary to execute push command since it can be done from IDE itself. Need to execute git remote add .

git remote add origin https://<username>@bitbucket.org/<username>/<reponame>

Best video to understand http://www.youtube.com/watch?v=klfLSRXUOzY fyi try to install the Command line console plugin for intellij before viewing the video.

Upvotes: 2

Nafiul Islam
Nafiul Islam

Reputation: 82470

I've created a youtube Video addressing this issue. Thanks @VonC for your help.

http://www.youtube.com/watch?v=klfLSRXUOzY

Upvotes: 8

VonC
VonC

Reputation: 1323773

Following this answer, you might need to open the "Git Bash", and define a remote:

git remote add origin http//IP/path/to/repository
git push -u origin master

In IntelliJ IDEA right-click on project select Synchronize 'YourProject'

For the reason behind the '-u' (upstream branch) option, see:
"Why do I need to explicitly push a new branch?".

Upvotes: 10

Related Questions