Skip to content

Start branches from upstream/main; bots accept a carried first commit - #50

Merged
thejesh23 merged 7 commits into
mainfrom
branch-from-upstream
Nov 26, 2026
Merged

thejesh23 merged 7 commits into
mainfrom
branch-from-upstream

Conversation

@thejesh23

Copy link
Copy Markdown
Owner

The second-account test (#45) found two traps for a learner who reaches Lesson 05 before their Lesson 02 pull request is merged. Lesson 02 puts the first commit on the fork's main, and it stays there, unmerged, until a maintainer merges it.

1. The Exercise 2 pull request carried the first commit (seen in #47)

The lesson said git switch main, git pull upstream main, git switch -c exercise-2, so the branch started from the fork's main. Then:

  • the first-commit bot commented "undo the other changes", meaning the exercise files
  • the Exercise 2 bot would have rejected the PR for touching a third file

2. git pull upstream main fails once upstream has moved

With a default git config it stops with Need to specify how to reconcile divergent branches. Lessons 03, 05, 09 and 10 all ran it.

Fixes

  • Lessons 03, 05, 09, 10: git fetch upstream, then git switch -c BRANCH upstream/main. No pull into main before the merge.
  • Troubleshooting: the error message, why it happens here, and a warning not to reset main while the first PR is open.
  • First-commit bot: stays quiet on an Exercise 2 PR.
  • Exercise 2 bot: accepts the learner's own first-commit file, gives it the first-commit checks, and explains it in its comment.

Run against the real pull requests: #47 now gets "Nice work" with the note, the first-commit bot is silent on #47, and #46 still passes.

Lectures 03, 05 and 10 are re-rendered.

🤖 Generated with Claude Code

thejesh23 and others added 7 commits November 26, 2026 14:47
A tester's Exercise 2 PR (#47) carried their unmerged first-commit file, because the branch started from the fork's main. The first-commit bot told them to undo their exercise files, and the Exercise 2 bot would have rejected the PR. Now the first-commit bot stays quiet on Exercise 2 PRs, and the Exercise 2 bot checks the carried file and explains it.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A learner's main holds their first commit until it is merged. Once upstream has moved, git pull upstream main stops with 'Need to specify how to reconcile divergent branches'.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A branch made from the fork's main carries the unmerged first commit into the Exercise 2 pull request (seen in #47).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Reported in #45: 'unterminated string literal (detected at line 3) (line 3)'.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Reported in #45 (#48 was opened with gh issue create --label and the bot skipped it).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@thejesh23
thejesh23 merged commit 2736c6f into main Nov 26, 2026
2 checks passed
@thejesh23
thejesh23 deleted the branch-from-upstream branch November 26, 2026 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant