DIY_GIT_in_Python/how_to/Change_02.md

8 lines
315 B
Markdown

- cli: Add argument parser
The real Git executable has multiple sub-commands, like 'git init', 'git commit',
etc. Let's use Python's built-in argument parser argparse to implement sub-commands.
You can see on the other side which changes were made. Now we can run 'ugit init'
and see "Hello, World!" printed out.