Challenge 1
Complete the Git command to change the checked-out branch.
git -
Press Ctrl⌘Enter to check your answer
Create a disposable repository with at least two divergent local branches. Make one branch current, introduce a controlled local modification, and attempt to switch to the other branch. Record whether Git permits or rejects the switch and why. Then repeat with a non-conflicting local modification, use `git switch -` to return to the previous branch, create a new branch with `git switch -c` from an explicit start point, and verify every resulting branch tip with `git rev-parse --verify <name>^{commit}`. In a separate disposable repository, demonstrate the difference between `--discard-changes` and `--merge`; if `--merge` produces a conflict, inspect the index state rather than hiding it. Do not use detached HEAD in this exercise; that belongs to the next lesson. Success requires evidence of the state transition: current branch before and after, target branch tip object IDs, working-tree/index status, and the exact reason a switch was accepted or refused. Destructive flags must be demonstrated only in disposable repositories.
Challenge 1
git -
Press Ctrl⌘Enter to check your answer
Challenge 2
git -c
Press Ctrl⌘Enter to check your answer
Challenge 3
git other
Press Ctrl⌘Enter to check your answer
Challenge 4
git -c fixup HEAD~1
Press Ctrl⌘Enter to check your answer