Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 721
Games Brainiac Avatar asked Jun 30 '13 18:06

Games Brainiac


People also ask

How Push code from bitbucket to IntelliJ?

Open IntelliJ and import your local project from File->Open. Once you have imported the project in local IDE, let's enable version control Integration so that we will be able to Push and Pull changes seamlessly in that project. Select Git and click OK. Click on “+” symbol to add Bitbucket repo URL.

How do I push a branch to Git in IntelliJ?

To push changes from the current branch press Ctrl+Shift+K or choose Git | Push from the main menu. To push changes from any local branch that has a remote, select this branch in the Branches popup and choose Push from the list of actions.

How commit and push your code in Git using IntelliJ?

Commit changesNavigate to the VCS → Git → Commit File option. Select files to be committed. Enter commit message and click on Commit button.

How does Git sync with IntelliJ?

From the main menu, choose VCS | Update Project or press Ctrl+T . The Update Project dialog opens. Select the update type (this strategy will be applied to all roots that are under Git version control): Merge the incoming changes into the current branch: select this option to perform merge during the update.


3 Answers

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?".

like image 144
VonC Avatar answered Sep 22 '22 06:09

VonC


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

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

like image 32
Games Brainiac Avatar answered Sep 20 '22 06:09

Games Brainiac


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.

like image 45
arvindwill Avatar answered Sep 20 '22 06:09

arvindwill