Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To facilitate multiple users or several GitHub accounts using the IntelliJ IDE, you need to follow these steps:

  1. Open IntelliJ IDEA and go to File -> Settings.
  2. Navigate to Version Control -> GitHub.
  3. Click on the “Add Account” button.
  4. In the “Login to GitHub” window that appears, enter the username and password of the GitHub account that you want to add.
  5. Click on the “Login” button to authenticate.
  6. Once you’ve successfully added the account, you can use it to create or clone repositories from within IntelliJ IDEA.

To switch between accounts:

  1. Select your project in the “Project” view.
  2. Right-click on the project and navigate to “Git” -> “Repository” -> “Configure Git Repository”.
  3. Switch to the “Remotes” tab.
  4. Add a new remote with a different name (e.g. “origin2”) and the URL of the repository you want to use.
  5. Go back to the main menu and select “VCS” -> “Git” -> “Fetch” to update the repositories.
  6. Finally, switch to the new remote by selecting “VCS” -> “Git” -> “Branches…” and selecting the relevant branch from the dropdown menu.