Git Fetch Arguments
Task
Download only the foo branch from origin, without updating the other remote branches.
Requirements
- Explicitly specify the remote
originand thefoobranch. - Do not run a full fetch of all branches.
- There is no need to move the local branches.
Expected result
A remote-tracking branch o/foo with the commits of the remote foo must appear in the local repository. main and o/main must stay where they are.
What you will learn
After completing this task you will be able to:
- run a selective fetch of a single branch;
- understand which objects and pointers are downloaded;
- avoid needlessly updating the entire remote.
Goal
local
origin