Skip to main content
Senior

Git Pull Arguments

Senior

Task

While on the local main, download the foo branch from origin and immediately merge it into the current branch.

Requirements

  • Explicitly specify the remote origin and the foo branch.
  • The integration must happen into the current main.
  • Any other remote branch will not do.

Expected result

A remote-tracking branch o/foo must appear, and the local main must include the commit from the remote foo. The state of origin does not change.

What you will learn

After completing this task you will be able to:

  • run pull from an explicitly chosen branch;
  • understand the relationship between fetch and the integration that follows;
  • distinguish the current local branch from the remote source of changes.
Goal
localC0C1o/mainC2HEAD main o/foo
originC0C1mainC2HEAD foo
Git trainer0 commands
terminal
localC0C1HEAD main o/main
originC0C1mainC2HEAD foo