Lab 04 -- Git branching; Basics of C programming
This page gives an overview of the lecture and the lab session on Aug 21, 2025.
Short lecture summary
-
Git as a time machine. Working and staging (index), HEAD and its relevance, Commit hashes, Commands: git commit, git branch, git switch, git log, git checkout, git status, git merge, committing with head detached, git restore, git revert, git reset, git fetch, git diff. Demo of most of these commands using git-sim.
-
Writing shell scripts, Systems architecture, Need for types, C programming language, Hello world program, Comparison with python programs. Compilation - how and why.
Readings
-
Dive Into Systems by Suzanne J. Matthews, Tia Newhall, Kevin C. Webb (Online version)
Read chapters
-
C Programming A Modern Approach (2nd Ed) by K. N. King (Online version)
Read chapters
-
Think OS, A brief introduction to operating systems by Allen B. Downey (Online version)
Read chapters
Practise
-
Work out all the git exercises from oh-my-git by playing the game.
-
Learn and understand git branching.
-
This is a nice tutorial on Git from grounds-up.
Additional readings
-
GNU C programming Tutorial - an excellent and well organized resource on C language.
-
For a basics introduction to operating system and how it helps in a better understanding of C programs, see this book chapter.
-
Read on how OS facilitates in running user programs in Operating system and Kernel abstraction.
-
Chapter 1 - A Tour of Computer Systems from Computer Systems: A Programmer’s Perspective, third edition