Add change 03 instructions

This commit is contained in:
David Doblas Jiménez 2024-02-10 19:08:21 +01:00
parent 227d6ccd30
commit 55b2c17913
1 changed files with 18 additions and 0 deletions

18
how_to/Change_03.md Normal file
View File

@ -0,0 +1,18 @@
- init: Create new .ugit directory
The 'ugit init' command creates a new empty repository.
Git stores all repository data locally, in a subdirectory called ".git", so upon
initialization we'll create one.
I named the directory ".ugit" rather than ".git" so that it doesn't clash with
Git, but the idea is the same.
To implement 'init', we could have just called os.makedirs from cli.py, but I
want to have some separation between different logical parts of the code:
+ cli.py - In charge of parsing and processing user input.
+ data.py - Manages the data in .ugit directory. Here will be the code that
actually touches files on disk.
This separation will be useful as the code will get larger.