Skip to content

THAMIZH-ARASU/PyGit-ProtoType

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyGit

              ____                    _______ __
             / __ \__  __            / ____(_) /_
            / /_/ / / / /  ______   / / __/ / __/
           / ____/ /_/ /  /_____/  / /_/ / / /_
          /_/    \__, /            \____/_/\__/,
                /____/
  

Py - Git

A Python implementation of a Git-like version control system, featuring a colorful ASCII logo and essential version control commands. PyGit is designed for learning, experimentation, and small projects.


Features

  • Initialize a new repository (init)
  • Add files to the staging area (add)
  • View repository status (status)
  • Commit changes (commit)
  • View commit history (log)
  • Show file differences (diff)
  • Create and list branches (branch)
  • Switch branches (checkout)
  • Colorful, centered ASCII logo on startup

Requirements

  • Python 3.7+
  • colorama (for colored terminal output)

Install dependencies:

pip install colorama

Installation

Clone the repository:

git clone https://github.com/yourusername/PyGit.git
cd PyGit

Usage

Run the CLI:

python main.py --help

Example output:

      ____                    _______ __
     / __ \__  __            / ____(_) /_
    / /_/ / / / /  ______   / / __/ / __/
   / ____/ /_/ /  /_____/  / /_/ / / /_
  /_/    \__, /            \____/_/\__/,        
        /____/

                            Py - Git

usage: main.py [-h] {init,add,status,commit,log,diff,branch,checkout} ...

PyGit - A Git clone in Python

positional arguments:
  {init,add,status,commit,log,diff,branch,checkout}
                        Available commands
    init                Initialize a new repository
    add                 Add files to staging area
    status              Show repository status
    commit              Create a new commit
    log                 Show commit history
    diff                Show differences
    branch              List or create branches
    checkout            Switch branches

options:
  -h, --help            show this help message and exit

Common Commands

  • Initialize a repo:
    python main.py init
  • Add files:
    python main.py add file.txt
  • Commit changes:
    python main.py commit -m "Initial commit"
  • View status:
    python main.py status
  • View log:
    python main.py log
  • Diff:
    python main.py diff
  • Branch:
    python main.py branch new-feature
    python main.py branch --all
  • Checkout:
    python main.py checkout new-feature

Contributing

Contributions are welcome! Please open issues or submit pull requests for improvements or bug fixes.

License

This project is licensed under the MIT License.

About

A Python implementation of a Git-like version control system, featuring a colorful ASCII logo and essential version control commands. PyGit is designed for learning, experimentation, and small projects.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages