This is a small implementation of a Git-like version control system in Python following the Nikita's tutorial -- ugit: DIY Git in Python
ugit init
ugit add
ugit commit -m
ugit checkout
ugit branch
ugit push
ugit merge
ugit merge-base
ugit fetch
ugit reset
ugit tag
ugit log
ugit diff -cache
ugit k
ugit status
ugit show
🚧 ugit function introduction is WIP 🚧
- clone the repos.
$ git clone repo_link https://github.com/ZhuohaoHe/my_ugit.git
- use setup.py to install this package. (need
setuptools
package)
$ python3 setup.py
- use development mode, if you want to edit the source and run it immediately.
$ python3 setup.py develop --user
- and now, just type
ugit
in CLI to use it.
$ ugit
├── setup.py : use setup.py to make my own python package
└── ugit
├── cli.py : in charge of parsing and processing user input.
├── base.py : the basic higher-level logic of ugit to implement higher-level structures for storing directories
├── data.py : contains the code that actually touches files on disk to manages the data in .ugit directory
├── diff.py : contain the code that deals with computing differences between objects
└── remote.py: contain all remote synchronization code
thanks to the Nikita's tutorial -- ugit: DIY Git in Python
Comments in the code source from Nikita's tutorial, Python doc, git-scm doc, W3Shools, Stack Overflow and myself 😋.