Challenge 1
Complete the Git command to inspect or update branch refs.
git -vv
Press Ctrl⌘Enter to check your answer
Create a disposable bare remote and clone it. Verify that the cloned main branch has an upstream. Create a local topic branch from origin/main with --no-track and verify that topic@{upstream} fails. Then set its upstream explicitly with git branch --set-upstream-to=origin/main topic and verify the relationship with git branch -vv and topic@{upstream}. Change the tracking target to another remote-tracking branch without moving topic, then remove the upstream with --unset-upstream. Finally, create another branch with --track=direct and observe that the branch tip and its upstream relationship are separate pieces of state.
Challenge 1
git -vv
Press Ctrl⌘Enter to check your answer
Challenge 2
git --set-upstream-to=origin/main main
Press Ctrl⌘Enter to check your answer
Challenge 3
git --unset-upstream main
Press Ctrl⌘Enter to check your answer
Challenge 4
git --track=direct topic origin/main
Press Ctrl⌘Enter to check your answer