How to Push Eclipse Project to GitHub on Windows 11

Eclipse IDE is widely used by Java and Android developers for its flexibility, plugin support, and integration with version control systems like Git. By connecting Eclipse to GitHub, you can easily manage commits, branches, and repositories — right from within the IDE.

In this guide, we’ll walk you through how to set up Git in Eclipse, connect your GitHub account, and push your first project step-by-step.

Prerequisites

Before we start, make sure you have:

Once these are ready, let’s begin.

Step 1: Verify Git Installation

Eclipse relies on Git to interact with GitHub. So first, check if Git is installed on your PC.

  1. Open Command Prompt or Windows Terminal.
  2. Type the following command: git --version
  3. If you see something like: git version 2.xx.x Git is successfully installed.

If you get an error like ‘git’ is not recognized, download and install Git from the link above, then restart your PC.

Step 2: Configure Git Credentials

Before connecting GitHub to Eclipse, set your global username and email.

git config --global user.name "Your Name"
git config --global user.email "your_email@example.com"

These credentials identify you as the author of commits in GitHub.

Step 3: Open Your Project in Eclipse

  1. Launch Eclipse IDE.
  2. Open your Java or Android project (or create a new one).
  3. Confirm that the project builds and runs correctly before linking it to Git.

Step 4: Enable Git Support in Eclipse

To manage Git operations inside Eclipse, you’ll use the EGit plugin, which comes preinstalled in modern Eclipse versions.

  1. Right-click your project in Project Explorer.
  2. Choose Team → Share Project.
  3. Select Git and click Next.
  4. If prompted, choose:
    • Create Repository (to initialize Git locally).
    • Make sure your project folder is checked.
  5. Click Finish.

Your project now becomes a local Git repository, and Eclipse will track changes automatically.

Step 5: Create a New Repository on GitHub

Now, create a GitHub repository to store your Eclipse project online.

  1. Log in to https://github.com.
  2. Click the “+” icon in the top-right corner → New repository.
  3. Enter a repository name (same as your project name is recommended).
  4. Keep the repo Public or Private, depending on preference.
  5. Do NOT check Initialize with README (to avoid conflicts).
  6. Click Create repository.

You’ll now see a page with your remote repository URL, which looks like this:

https://github.com/yourusername/your-repo-name.git

Copy it — you’ll need it in the next step.

Step 6: Link Eclipse Project to Remote Repository

Now we’ll connect your local Git repository (in Eclipse) to the remote GitHub repository.

  1. In Eclipse, open the Git Repositories view:
    • Go to Window → Show View → Other → Git → Git Repositories.
  2. Right-click your local repository → Remotes → Create Remote.
  3. Select origin as the remote name (default).
  4. Click Configure Push.
  5. In the URI field, paste your GitHub repository URL.
  6. Under Authentication, select one of the following:
    • HTTPS: Enter your GitHub username and Personal Access Token (PAT) (required since passwords are no longer accepted).
    • SSH: Use your SSH key if already configured.
  7. Click Save and Push.

Step 7: Commit Your Code

Before pushing code to GitHub, you need to commit your local changes.

  1. Right-click your project → Team → Commit.
  2. Select the files you want to include.
  3. Write a commit message (e.g., “Initial commit”).
  4. Click Commit and Push.

Eclipse will now upload your project to GitHub. If it’s your first time, you’ll be prompted for authentication (use your token).

Step 8: Verify the Upload on GitHub

After the push is complete, open your GitHub repository page in your browser.

You should now see all your project files uploaded.

Step 9: Pull and Push Future Changes

Once linked, you can manage all version control directly from Eclipse.

  • To Push Changes:
    Right-click project → Team → Push to Upstream.
  • To Pull Updates from GitHub:
    Right-click project → Team → Pull.

Tip: Make sure you always pull the latest changes before committing new code to avoid conflicts.

Wrapping Up

Pushing your Eclipse project to GitHub helps you back up your work, collaborate efficiently, and maintain clean version control. Once your local repository is connected, you can manage commits, pushes, and pulls directly inside Eclipse — no command line needed.

By following this step-by-step guide, you’ve successfully linked Eclipse with GitHub and pushed your first project online. Now you can easily track progress, roll back changes, and contribute to open-source projects with confidence.

Posted by Arpita

With a background in Computer Science, she is passionate about sharing practical programming tips and tech know-how. From writing clean code to solving everyday tech problems, she breaks down complex topics into approachable guides that help others learn and grow.