Git Basics


Figure 1

“Piled Higher and Deeper” by Jorge Cham, http://www.phdcomics.com

Figure 2

Changes Are Saved Sequentially

Figure 3

Different Versions Can be Saved

Figure 4

Multiple Versions Can be Merged

Setting Up Git


Creating a Repository


Figure 1

motivatingexampleWerewolf vs dracula by b-maze / Deviant Art. Mars by European Space Agency / CC-BY-SA 3.0 IGO. Pluto / Courtesy NASA/JPL-Caltech. Mummy © Gilad Fried / The Noun Project / CC BY 3.0. Moon © Luc Viatour / https://lucnix.be / CC BY-SA 3.0.


Tracking Changes


Figure 1

When you open nano it was appear like this. Start typing your text.


Figure 2

In this case Cold and dry, but everything is my favorite color


Figure 3


Figure 4

The Git Staging Area

Figure 5

The Git Commit Workflow

Exploring History


Figure 1

Git Checkout

Figure 2

https://figshare.com/articles/How_Git_works_a_cartoon/1328266

Ignoring Things


Remotes in GitHub


Figure 1


Figure 2


Figure 3


Figure 4

The Local Repository with Git Staging Area

Figure 5

Freshly-Made GitHub Repository

Figure 6


  • Figure 7


  • Figure 8


  • Figure 9


  • Figure 10


  • Figure 11


  • Figure 12


  • Figure 13

    Where to Find Repository URL on GitHub

    Figure 14


    Figure 15


    Figure 16

    GitHub Repository After First Push

    Figure 17


    Figure 18


    Wrap-up