Challenge 1
Complete the Git command to write the index as a tree object.
git
Press Ctrl⌘Enter to check your answer
Create a disposable repository containing a nested directory and at least two files. Stage the files, run `git write-tree`, and prove that the returned object is a tree. Then run `git write-tree --prefix=<your-directory>/` and inspect the resulting subtree with `git ls-tree`. Finally, create an unresolved merge in a disposable repository and demonstrate that `git write-tree` refuses the unmerged index; resolve the conflict, stage the result, and show that write-tree succeeds.
Challenge 1
git
Press Ctrl⌘Enter to check your answer
Challenge 2
git --prefix=<your-directory>/
Press Ctrl⌘Enter to check your answer
Challenge 3
git --prefix=sub/
Press Ctrl⌘Enter to check your answer
Challenge 4
git --missing-ok
Press Ctrl⌘Enter to check your answer