Skip to content

This repository guides you through the fundamentals of building basic Git features: setting up a local repository, staging file(s) for tracking, inspecting the state of your project, and examining the commit timeline. You'll also gain insight into core internal operations such as hashing and compressing.

License

Notifications You must be signed in to change notification settings

Bcromas/build-your-own-git-basics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

build-your-own-git-basics

This repository guides you through the implementation of basic Git functionalities, including initializing a local repository, adding file(s) to the staging area, committing changes with messages, checking the status of your working directory, and viewing the log/commit history. It also covers essential underlying mechanisms like content hashing and compression.

This repository contains two branches:

  • exercise: This is the branch you should work in. It contains the initial file structure and prompts to guide your implementation.
  • solution: This branch provides a complete, functional example of the Git basics implemented in this repository. You can refer to this branch if you get stuck or want to see how the code should work.

Setup Instructions

This implementation relies solely on Python's standard library, eliminating the need for a virtual environment.

Obtain Files for Tracking/Committing

To experiment with this tool, ensure you have some .txt or .py files readily available for tracking and committing.

Start Implementing

Each file contains prompts to guide you through completing the implementation of basic Git functionalities. You'll progress through different features, starting with simpler approaches in v1 and more advanced ones in v2. I recommend completing v1 before starting on v2.

  1. basic_git_1.py
  2. basic_git_2.py

Helpful Resources

Git

hashlib

zlib

About

This repository guides you through the fundamentals of building basic Git features: setting up a local repository, staging file(s) for tracking, inspecting the state of your project, and examining the commit timeline. You'll also gain insight into core internal operations such as hashing and compressing.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages