Last Updated: November 19, 2020
· dmytrodanylyk

Intellij IDEA how to upload project to remote branch?

You can't upload your local Git repository to remote using IntelliJ IDEA plugin. For this you need to use Git Bash

To create GIT repository and upload it to remote:

  1. In IntelliJ IDEA menu: VCS -> Import into Version Control -> Create Git Repository
  2. In pop up window select your project and click ok.
  3. Commit all necessary files to you local branch master
  4. Open Git Bash and navigate to project folder e.g cd "D:\projects\TestProject"
  5. In Git Bash: git remote add origin http//IP/path/to/repository
  6. In Git Bash: git push origin master
  7. In IntelliJ IDEA right-click on project select Synchronize 'TestProject'
  8. In IntelliJ IDEA right-click on project select Git -> Repository -> Branches -> origin/master -> Checkout as new local branch

Now you should be able to do pull/push using IntelliJ IDEA plugin.

Related protips:

Force a "git stash pop"