Crates.io | git_status |
lib.rs | git_status |
version | 0.1.0 |
source | src |
created_at | 2024-03-04 07:57:42.263484 |
updated_at | 2024-03-04 07:57:42.263484 |
description | A tool to git status automation |
homepage | https://github.com/Kratosgado/git_status |
repository | https://github.com/Kratosgado/git_status |
max_upload_size | |
id | 1161355 |
size | 11,034 |
A command-line utility written in Rust to display the status of Git repositories in folders. And allows to auto commit and push unclean repos.
This project provides a set of utility functions to interact with Git using Rust. Feel free to contribute.
is_git_installed() -> bool
This function checks if Git is installed on the system by running the git --version
command.
is_git_repo(path: &std::path::Path) -> bool
This function checks if the given path is inside a Git repository by running the git rev-parse --is-inside-work-tree
command in the given directory.
check_git_status(path: &std::path::Path)
This function checks the status of the Git repository at the given path by running the git status
command. If there are changes, it prompts the user to add, commit, and push the changes.
add_commit_push(path: &std::path::Path)
This function adds all changes, commits them with the message "auto commit", and pushes them to the remote repository. It runs the git add .
, git commit -m "auto commit"
, and git push
commands in the given directory.
git_status [root folder]