Pregunta

So I've been watching some videos from the Facebook Mobile DevCon 2013 (http://www.youtube.com/watch?v=mLuaUtbGvEM) on youtube and every time someone explains something new he or she does a new checkout and all the new code was added to your project. So is this something like different versions of your project? How does this exactly work?

Can someone just explain roughly what a git checkout is and what is needed to set one up?

EDIT The speaker does a git checkout on 38:49

¿Fue útil?

Solución

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top