Skip to content
Foxipa
Code Completion 4 Challenges

Complete the Git commands: Git Remote Names and Remote-Tracking References

Create two disposable repositories: a source repository and a bare remote. Add the remote to the source with a non-default name such as upstream, publish main, and create a separate clone. In the clone, inspect the remote name and fetch refspec, verify refs/remotes/origin/main, then advance the source main branch and fetch again. Prove with object IDs that origin/main advances while the clone’s current local branch and working tree remain unchanged. Finally create a new topic branch in the source, publish it, fetch in the clone, and prove that refs/remotes/origin/topic exists while refs/heads/topic does not. Record the exact refs and object IDs you observed.

Intermediate ~6 min read

Challenge 1

Complete the Git command to inspect remote configuration.

bash Your answer
git 

Press Ctrl⌘Enter to check your answer

Challenge 2

Complete the Git command to inspect remote configuration.

bash Your answer
git  -v

Press Ctrl⌘Enter to check your answer

Challenge 3

Complete the Git command to download remote refs and objects.

bash Your answer
git  origin

Press Ctrl⌘Enter to check your answer

Challenge 4

Complete the Git command to download remote refs and objects.

bash Your answer
git  origin main

Press Ctrl⌘Enter to check your answer