CS400: Git Basic

Introduction to Git

Git is a distributed version control system that helps developers track changes in their code, collaborate with others, and manage project history efficiently. Understanding Git's workflow and commands is essential for modern software development.

Git Workflow Diagram

Git workflow showing the relationship between different areas and commands.

Git Areas

Git uses several distinct areas to manage your files and their history. Understanding these areas is crucial to using Git effectively.

Working Directory

This is your local file system where you create, edit, and delete files. Changes here are not yet tracked by Git.

Staging Area

Also called the "index", this is where you prepare changes before committing them. It acts as a middle ground between your working directory and repository.

Local Repository

This is Git's database on your local machine where committed changes are permanently stored. Each commit creates a snapshot of your project.

Remote Repository

A version of your repository hosted on a server (like GitHub or GitLab) that enables collaboration with other developers.

Essential Git Commands

These are the fundamental Git commands you'll use regularly to manage your code and collaborate with others.

Additional Resources

Learn more about Git from these excellent resources: