Skip to content

Latest commit

 

History

History
141 lines (103 loc) · 3.2 KB

File metadata and controls

141 lines (103 loc) · 3.2 KB

Fix: Branch Has No Commits

Problem

You created the branch feat/oracle-rescue-tool but the commits are still on master. The branch is empty.

Solution

You need to either:

  1. Cherry-pick the commits to the new branch, OR
  2. Reset and recommit on the new branch

Option 1: Cherry-pick (Recommended)

Step 1: Kill the blocking gh process

  • Open Task Manager (Ctrl+Shift+Esc)
  • Find gh.exe process
  • Click "End Task"

Step 2: Open NEW PowerShell/Terminal

Step 3: Navigate and check status

cd C:\Users\TOSHIBA\Desktop\tikka
git status
git log --oneline -3

You should see your commit 7e067e5 on master.

Step 4: Switch to feature branch

git checkout feat/oracle-rescue-tool

Step 5: Cherry-pick the commit from master

git cherry-pick 7e067e5

Step 6: Push the branch

git push -u origin feat/oracle-rescue-tool

Step 7: Create PR on GitHub

Go to: https://github.com/crackedstudio/tikka/pulls Click "New Pull Request"

Option 2: Using GitHub Desktop (Easier)

Step 1: Open GitHub Desktop

Step 2: Switch to master branch

  • Click "Current Branch" dropdown
  • Select "master"

Step 3: You should see your commit

  • "feat(oracle): Add comprehensive rescue tool for failed jobs"

Step 4: Right-click the commit

  • Select "Cherry-pick commit..."
  • Choose branch: feat/oracle-rescue-tool

Step 5: Switch to feat/oracle-rescue-tool branch

  • Click "Current Branch" dropdown
  • Select "feat/oracle-rescue-tool"

Step 6: Push the branch

  • Click "Push origin" button

Step 7: Create PR

  • Click "Create Pull Request" button

Option 3: Start Fresh (If above doesn't work)

Step 1: Delete the empty branch on GitHub

Step 2: In GitHub Desktop

  • Switch to "master" branch
  • You should see your commit

Step 3: Create new branch FROM master

  • Click "Current Branch" dropdown
  • Click "New Branch"
  • Name: feat/oracle-rescue-tool
  • Important: Make sure "Create branch based on: master" is selected
  • Click "Create Branch"

Step 4: Publish branch

  • Click "Publish branch" button

Step 5: Create PR

  • Click "Create Pull Request" button

Quick Verification

After following any option, verify:

git checkout feat/oracle-rescue-tool
git log --oneline

You should see:

7e067e5 feat(oracle): Add comprehensive rescue tool for failed jobs

Then check files:

ls oracle/src/rescue/

You should see:

  • rescue.module.ts
  • rescue.service.ts
  • rescue.controller.ts
  • rescue.cli.ts
  • rescue.service.spec.ts

Why This Happened

When you created the branch, you were already on master with the commit. Creating a new branch doesn't automatically move commits - it just creates a pointer. You need to either:

  • Create the branch BEFORE committing, OR
  • Cherry-pick/move commits to the new branch after creating it

Recommended: Option 2 (GitHub Desktop)

It's the easiest and most visual way to fix this. Just:

  1. Open GitHub Desktop
  2. Go to master branch
  3. Right-click your commit → Cherry-pick to feat/oracle-rescue-tool
  4. Switch to feat/oracle-rescue-tool
  5. Push
  6. Create PR

Done! 🚀