Introduction to Git


Figure 1

“notFinal.doc” by Jorge Cham, https://www.phdcomics.com
“notFinal.doc” by Jorge Cham, https://www.phdcomics.com

Figure 2

A diagram demonstrating how a single document grows as the result of sequential changes

Figure 3

A diagram with one source document that has been modified in two different ways to produce two different versions of the document

Figure 4

A diagram that shows the merging of two different document versions into one document that contains all of the changes from both versions

Figure 5

How the commit graph looks for this website.

Why use Git?


Fundamental concepts


Figure 1


Figure 2

Source control tab showing modified file and a new file.

Figure 3

Source control tab showing changes in the staging area.

Your first Git repository


Tracking changes


Remotes: pushing and pulling


Figure 1


Figure 2


Figure 3


Figure 4


Figure 5


Figure 6


Figure 7


Figure 8


Figure 9


Cloning a repository


Figure 1


Figure 2


Figure 3


Forking a repository


Figure 1


Figure 2


Figure 3


Figure 4


Figure 5


Figure 6


Figure 7


Figure 8


Figure 9


Figure 10


Figure 11


Figure 12


Figure 13


Figure 14


Tips and best practices