Skip to content

intellij_vcs

Sam Shore edited this page Jan 31, 2016 · 1 revision

Using GitHub in IntelliJ

This is JetBrains' guide to integrating GitHub with IntelliJ. Consult this if you run into problems https://www.jetbrains.com/idea/help/using-github-integration.html

Enable GitHub Plugin (this is probably enabled by default)

  • Download and Install

    • open settings (file > settings or ctrl+alt+s)
    • from the left pane, navigate to plugins (note: come back here to update/uninstall any plugins)
    • search for Git and download/install the GitHub plugins
    • restart IntelliJ
  • Enable Git in IntelliJ

    • open settings
    • click the drop down arrow next to version control in the left pane
    • click on Git (not GitHub)
    • fill in path to Git (if you downloaded git from git-scm.com, the default path on Windows is C:\ProgramFiles(x86)\Git\cmd\git.exe)

Register GitHub Account In IntelliJ

  • open settings > version control, as before
  • click on GitHub (not Git)
  • choose authentication type (token is recommended by GitHub so IntelliJ does not have to remember your login)
  • enter your GitHub login information and click ok

Clone Repositories from GitHub (this is not necessary if you have previously cloned the repository)

Create a New Project and Push to GitHub

  • start a new project
  • click next until you get to the project location box, navigate to where you cloned the repository, go to your directory within the class repository, create a new folder for this project, and complete the project creation
  • if a dialogue box appears in the upper right-hand corner, click add root
  • when ready, highlight all of the files you want to push to the repository, right click > git > add, and then right click > git > commit
  • the files you chose should be selected in the window that pops up, click commit (optionally, commit and push)
  • alternatively, use the push and pull arrows in upper right hand corner
    • note: if changes have been made since last pull, an error will occur. Just click merge and then your files will be pushed
  • to view your files on GitHub, right click the files > open on GitHub

Clone this wiki locally