Skip to content

Latest commit

 

History

History
156 lines (93 loc) · 3.7 KB

README.md

File metadata and controls

156 lines (93 loc) · 3.7 KB

crowGit

two types : 1-with cli commands , 2-with prompts that lets you choose , it does git-add,commit,branch,change_branch,logs , we have flags with cli

mygit_cli.py is the one with cli commands, run it to use the cli version of my git:

MyGit is a simplified version control system inspired by Git. It allows you to manage your project's version history, create branches, commit changes, and more, all from the command line.

Table of Contents

#Installation To use mygit_cli with cli commmands, follow these steps:

Clone the MyGit repository to your local machine: 1- git clone https://github.com/biohacker0/crowGit.git

2-cd mygit

3: have some files in the root folder to test it first , I have included some file in github already to test, I am working on it currently, so it not that stable.

#Commands MyGit supports the following commands:

Sure, here's the text formatted in a more minimalist style for your GitHub README file:


mygit_cli.py

This is a Python-based CLI for Git operations. Here are the available commands:

init

Initialize a new Git repository in the current directory.

python mygit_cli.py init

add

Add files to the Git index.

python mygit_cli.py add .
python mygit_cli.py add <filename>

<filename>: The name of the file you want to add to the index. Use . to add all files in the current directory and its subdirectories.

--recursive, -r: Recursively add files in the current directory and its subdirectories.

Examples:

python mygit_cli.py add .
python mygit_cli.py add myfile.txt
python mygit_cli.py add . --recursive

commit

Commit changes to the Git repository.

python mygit_cli.py commit --message <message> --author <author> [--branch <branch>]

--message: The commit message.

--author: The name of the author.

--branch: (Optional) The branch name to commit to. If not specified, it will commit to the current branch.

Examples:

python mygit_cli.py commit --message "Initial commit" --author "John Doe"
python mygit_cli.py commit --message "Fix a bug" --author "Alice" --branch myfeaturebranch

log

View commit history.

python mygit_cli.py log [--branch <branch>]

--branch: (Optional) The branch name to view commits. If not specified, it will show commits from the current branch

Examples:

python mygit_cli.py log
python mygit_cli.py log --branch myfeaturebranch

create_branch

Create a new branch.

python mygit_cli.py create_branch <branch_name>

<branch_name>: The name of the new branch.

Example:

python mygit_cli.py create_branch myfeaturebranch

switch_branch

Switch to an existing branch.

python mygit_cli.py switch_branch <branch_name>

<branch_name>: The name of the branch to switch to.

Example:

python mygit_cli.py switch_branch myfeaturebranch

To use the non cli version mygit.py , just run it and you will understand how to use it by using it, its simple, just choose a number like 1,2,3 etc , dont type the word init, choose the number associated with it.