eclipse source control with github

 Here is the simple, correct, up-to-date way to use Git + GitHub from Eclipse.


Step 1: Install EGit Plugin (Usually Already Installed)

Most Eclipse versions already include EGit.

Check:

  1. In Eclipse, go to
    Help → About Eclipse IDE → Installation Details → Plug-ins

  2. Search for EGit.

If not present:

  • Go to Help → Eclipse Marketplace

  • Search EGit

  • Install it

  • Restart Eclipse


Step 2: Connect Eclipse to Your Local Git Repository

Option A — You already have a project in Eclipse

You want to create a git repo for it.

  1. Right-click the project → Team → Share Project

  2. Select Git

  3. Click Create Repository

  4. Finish

Now your project is a Git repo.


Step 3: Add GitHub as Remote

You need your GitHub repo URL.
Example:
https://github.com/username/projectname.git

In Eclipse:

  1. Right-click your project → Team → Remote → Configure Push to Upstream

  2. Enter:

    • URI: paste your GitHub URL

    • Authentication: GitHub username + PAT (personal access token)

  3. Click Next, then select:

    • master/main → master/main

  4. Finish


πŸ” GitHub Now Requires PAT (Not Password)

If you don’t have a PAT:

  1. Go to github.com → Settings → Developer Settings → Personal Access Tokens → Fine-grained

  2. Generate new token with:

    • repo permissions

  3. Copy token → use it in Eclipse instead of password.


Step 4: First Commit

  1. Right-click project → Team → Commit

  2. Select files → add commit message

  3. Click Commit and Push


Step 5: Daily Workflow

1️⃣ Pull latest

Right-click project → Team → Pull

2️⃣ Make your changes

3️⃣ Commit changes

Right-click → Team → Commit

4️⃣ Push to GitHub

Right-click → Team → Push to Upstream


πŸ“Œ Additional Useful Views

Enable Git UI inside Eclipse:

  1. Window → Show View → Other…

  2. Expand Git:

    • Git Staging

    • Git Repositories

    • Git History

These give you full visibility like VS Code or GitKraken.

Comments

Popular posts from this blog

OVERSOLD BY LINEAR REGRESSION

OVERSOLD BY LINEAR REGRESSION

Top No-Code Algo Trading Platforms in India (2025) – Full Comparison & Ranking