``` git checkout A git checkout B -- . ``` Update the working tree and index with the contents of `B`, then commit.
Update the working tree and index with the contents of
B, then commit.