Two Lines of Work
main and feature have both gained commits since they split. You are on main. Merge feature into it, and give the merge commit the message merge feature.
Example 1
starts as
* 2a5f13d (HEAD -> main) add m | * 5f6b5ac (feature) add f |/ * b527f18 first commit nothing to commit
ends as
on branch: main commits, newest first: merge feature (a merge) add f add m first commit files in the latest commit: a.txt f.txt m.txt
Constraints
- Each branch has 1 or 2 commits of its own
- They changed different files, so nothing conflicts
Write it in your browser, against the clock. The model script, with a note on each command it uses, comes after.
More Git problems
- Undo With a New CommitMedium
- An Older CommitHard
- Both Sides MovedHard
- Commits per AuthorHard
- Find and PickHard
- Get Them BackHard
- On Top of MainHard
- Split the CommitHard