Learn Python automation by recreating Git Commit from scratch

Matteo Bertucci

Beginners Best Practice Case Study Command-Line Git

See in schedule

This talk is divided in two parts: the first one will explore how the Git key-value storage work and the second part will walk through recreating the fundamental `git commit` command with less than 80 lines of Python.

You can follow this talk at home using shell commands provided by the speaker and explore Git on your own. The code is also a great way to familiarize yourself with making and structuring Python utility scripts. It is also a great way to present more intermediate programming concept such as recursion.

All the commands and code are wrote to be as easy to understand as possible and commented by the speaker, as this talk aims to be simple to follow by Python and Git beginners. Good programming practice will be quickly shown, such as the use of f-strings and the usage of pathlib over os.path.

The final application is kept pretty barebone for brevity sakes, although challenges with some hints are given at the end of the talk as an exercise.

The final goal of this talk is to give the watcher a feel on how they can use Python in their every day life to automate different tasks, and some pointers toward good programming practices and continue in their Python journey.

This talk is inspired from an unpublished article wrote by myself that you can consult here: https://www.notion.so/Recreating-Git-Commit-in-Python-269f72bbc69d4f7e8aa64f67cc7d95d1
The final source code can be found here: https://gist.github.com/Akarys42/47085d16978947039279d75e1773725e

Type: Talk (30 mins); Python level: Beginner; Domain level: Beginner


Matteo Bertucci

I'm Matteo, future student at Polytech Marseille, France, who loves programming!

I'm working with Python, Rust, Docker and Kubernetes on my past time, for both my personal projects and at Python Discord as a Core Developer and DevOps member. In this online community, we hope to foster a friendly environment for both younger and older Python programmers to get help and discuss.

Inspired by the wondeful Ben Eater, I love everything more or less close to electronics and low-level programming and hope to make it my work one day!