Skip to main content
Senior

Remote Tracking

Senior

Task

Create a local feature branch directly from o/main, add a commit and publish the new branch using the configured tracking relationship.

Steps

  1. Create feature from o/main and switch to it.
  2. Make one commit.
  3. Run push, relying on the branch's link to the remote.

Expected result

A feature branch must appear on origin. The local feature must track o/feature, and main must stay unchanged.

What you will learn

After completing this task you will be able to:

  • create a branch from a remote-tracking pointer;
  • understand the purpose of the upstream/tracking relationship;
  • run push without explicitly naming the branch once the relationship is set up.
Goal
localC0C1main o/mainC2HEAD feature o/feature
originC0C1HEAD mainC2feature
Git trainer0 commands
terminal
localC0C1HEAD main o/main
originC0C1HEAD main