Linux, terminal and Git

Stage 5 · Lesson 1 of 8

How Git thinks: snapshots and history

Git fundamentals

saves your project as a series of called commits. Each commit records every file as it was at that moment, plus a message, an author and a link to the commit before it (its parent). Each commit has a unique ID called a hash.

A is just a movable label that points at one commit. HEAD is a marker for where you are right now. Once this picture is clear, Git commands stop feeling like magic.

Making a commit moves the branch label forward. Switching branches moves HEAD. Merging joins two lines of history into one. When confused, draw the commits and labels on paper.

Common traplearning commands as recipes without the model, then panicking when something unusual happens.

A question to check yourself, an AI practice session and 2 cheat sheet entries come when you add the roadmap to your account. Add it

Resources for this stage

Start with· follow one of these

  • BookFree
    Pro Git

    Scott Chacon and Ben Straub

    The free official Git book; chapters 2 and 3 cover everything in this stage properly

  • CourseFree
    The Missing Semester of Your CS Education

    MIT · Beginner

    The version control lecture teaches Git from its data model upwards, which makes commands make sense

Practise

Keep handy

Also worth your time

Mark this stage as not done?