How should I add my intelliJ project to an already existing Github repository?


I already have a Github repository, but I need to add my actual project to the repository. How should I do this with IntelliJ? The project should be versioned of course.


IntelliJ will automatically discover and "add" your git repository as soon as it finds a .git directory in the project root directory. The steps you have to run depend on whether you already have a Git repository initialized for your project or not. If not, first open a terminal (e.g. by pressing ALT+F12 for opening a terminal window in IntelliJ) and run

git init

Afterwards (or if you already have a git repository in your project) you can "connect" this repository to your project on Github with

git remote add origin GIT_URL_ON_GITHUB

IntelliJ will then "find" your repository and offer git support.


You can initialize the local directory of your project as a Git repository with the following steps: <a href="https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/" rel="nofollow">https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/</a>

Then, if you have Git plugin for IntelliJ, go to version controll, commit changes, and then you can push.


I don't know how familiar you are with IDEA hotkeys, therefore the instruction using top navigation bar: VCS -> Enable Version Control Integration -> Select your version control system (Git in your case) -> Wait for IDEA to update project -> Your project hierarchy now shows all files in brown color -> Select the files you want to commit -> Right click and select Git-Add -> In the bottom navigation bar you should also see "9: Version Control" -> Click on this button -> The window with uncommited changes appears and recently added files are green-colored -> Select the files you want to commit -> Right click on the files -> Select "Commit Changes" from the popup menu -> Specify commit message -> Hover over the "Commit" button -> Press "Commit and Push" -> In the dialog you can specify the master branch of your origin repo on Github -> Press Push after that -> You're done.

Feel free to ask if I missed smth. out.


  • Custom domains in a Rails App
  • Source file (.py) not compiling (.pyc not updated)
  • MySpace DOM?
  • After message type e, program doesn't return to selection-screen ABAP
  • React Native + Redux: What's the best and preferred navigation?
  • PHP - Can't dynamcally instantiate class
  • nhibernate queries SubQueryExpression
  • Netlink sockets and libnl - nl_recvmsgs_default returning -16 (EBUSY)
  • Recreate the Oracle DUAL table
  • Kivy, TypeError: 'NoneType' object has no attribute '__getitem__'
  • Specify HTTPS for custom WCF Binding
  • Using an STL Iterator without initialising it
  • Unix Network Programming Clarification
  • JSON - slashes not escaping
  • Google map in top corner left
  • Converting query results into DataFrame in python
  • Time out Error in send mail
  • How can I get the choice “H2” back in the H2 consol?
  • pip in virtualenv gets ConnectTimeoutError
  • blocking spam referer domain with web.config
  • Dynamically switching connect in Modelica
  • nonblocking BIO_do_connect blocked when there is no internet connected
  • Redux Form - Not able to type anything in input
  • How to use JavaScript to determine whether a file exists in a directory?
  • ADO and msqli connections very slow
  • Get history of file changes from TFS to implement custom “blame”-behaviour of exceptions
  • Android activity accessing service's static reference before the service is ready
  • Installing Apache MyFaces 2 on WildFly 8.2.0
  • Hardware Accelerated Image Scaling in windows using C++
  • PHP buffered output depending on server setting?
  • Can I make an Android app that runs a web view in Chrome 39?
  • Timeout for blocking function call, i.e., how to stop waiting for user input after X seconds?
  • How to include full .NET prerequisite for Wix Burn installer
  • Acquiring multiple attributes from .xml file in c#
  • How can I remove ASP.NET Designer.cs files?
  • python draw pie shapes with colour filled
  • Are Kotlin's Float, Int etc optimised to built-in types in the JVM? [duplicate]
  • Is there any way to bind data to data.frame by some index?
  • costura.fody for a dll that references another dll
  • How can i traverse a binary tree from right to left in java?