How to Push to a GitHub Repository in IntelliJ

intellij

1. Initialize and Connect the Git Repository

# Run in the terminal from the project root
git init
git remote add origin https://github.com/[user]/[repository].git

2. Configure Git in IntelliJ

  1. Select VCSEnable Version Control Integration.
  2. Choose Git and click OK.

3. Connect Your GitHub Account

  1. Go to FileSettings (on Windows) or IntelliJ IDEAPreferences (on macOS).
  2. Navigate to Version ControlGitHub.
  3. Click Add Account (+).
  4. Select Log In with Token... and enter your GitHub Personal Access Token.

4. Add and Commit Files

  1. Go to VCSGitAdd (or use the shortcut Ctrl+Alt+A).
  2. Select the files you want to commit.
  3. Go to VCSCommit (or use the shortcut Ctrl+K).
  4. Write a commit message and click Commit.

5. Push

  1. Go to VCSGitPush (or use the shortcut Ctrl+Shift+K).
  2. Click the Push button.

Simpler Method (Using IntelliJ's Built-in Feature)

  1. Go to VCSShare Project on GitHub.
  2. Set the repository name to vita-user-service.
  3. Click Share.

If the repository already exists on GitHub, you can simply add the remote and then push.

Comments

Popular posts from this blog

Speech-to-Text and Speaker Diarization with Wav2Vec2 and pyannote.audio 3.1 on Ubuntu 24.04

How To Install Python 3.10 on Ubuntu 24.04 for pyannote.audio Compatibility