The speaker probably has a git repository with multiple branches or tags for each stage of the demo/walk-through. git checkout
is used to checkout a given branch/tag/hash and all the files will be updated in-place. Xcode will detect the files changes and refresh its editor view and Groups and Files pane.
To create this kind of thing yourself, you would develop the code and create branches at various points using a command like git branch step2
, git branch step3
etc. after the latest commit that you made.
When doing the demo, you can then git checkout step3
to move to that point in your commit tree.