FunctionRacerProblemsRace

Both Sides Moved

HardGita shell script

You have commits that origin does not have, and a teammate has pushed commits that you do not have. The team keeps its history in one straight line: no merge commits. Get your commits onto origin, on top of the teammate's.

Example 1

starts as
* 3adce7f (HEAD -> main) my work
* b527f18 (origin/main) first commit
nothing to commit
on origin:
  dae8e37 the teammate's work
  b527f18 first commit
ends as
commits on origin, newest first:
  my work
  the teammate's work
  first commit
commits, newest first:
  my work
  the teammate's work
  first commit
staged: nothing
changed, not staged: nothing
untracked: nothing

Constraints

Race itor take your time

Write it in your browser, against the clock. The model script, with a note on each command it uses, comes after.

More Git problems