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.
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.
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.
Commit changesNavigate to the VCS → Git → Commit File option. Select files to be committed. Enter commit message and click on Commit button.
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.
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?".
I've created a youtube Video addressing this issue. Thanks @VonC for your help.
http://www.youtube.com/watch?v=klfLSRXUOzY
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With