syncgit

Crates.iosyncgit
lib.rssyncgit
version
sourcesrc
created_at2025-05-03 22:18:02.855121+00
updated_at2025-05-18 09:54:33.921271+00
descriptionUna herramienta CLI para sincronizar repositorios Git
homepage
repository
max_upload_size
id1659184
Cargo.toml error:TOML parse error at line 19, column 1 | 19 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
Ricky (rickypcyt)

documentation

README


๐Ÿ› ๏ธ Git Sync CLI

A lightweight Rust-based CLI tool to automate common Git tasks such as detecting the repository root, checking status, pulling, committing, and pushing changes โ€” all in a clean, user-friendly terminal interface.

๐Ÿ“‹ Features

  • ๐Ÿ” Automatically finds the root of a Git repository.
  • ๐Ÿ—‚๏ธ Displays the repository name and path.
  • โœ… Checks repository status (git status -sb).
  • โฌ‡๏ธ Pulls the latest changes from the remote.
  • ๐Ÿ“ฆ Detects uncommitted changes and stages them.
  • โœ๏ธ Prompts for a commit message.
  • โฌ†๏ธ Pushes commits to the remote (with optional GitHub token support).
  • ๐ŸŒ Checks for internet connectivity before pushing.

๐Ÿงฑ Requirements

  • Rust
  • Git installed and configured.
  • (Optional) Set a GitHub token as an environment variable for private repositories:
export GITHUB_TOKEN=your_token_here

##Global Installation

To make the tool globally available:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
cargo install syncgit 

Usage

Simply run the program in any folder containing a Git repository:

syncgit

๐Ÿงช Usage

Run the tool from anywhere inside a Git repository:

sync-git

Sample Flow:

  1. Finds the .git root directory.
  2. Displays repository path and name.
  3. Shows Git status.
  4. Pulls changes from remote.
  5. Detects and stages modified or untracked files.
  6. Prompts for a commit message.
  7. Commits and pushes the changes.

๐ŸŒ Offline Mode

If no internet connection is detected, changes are committed locally but not pushed. A message will inform you to push manually once online.

๐Ÿ” GitHub Token Authentication

To push to private GitHub repositories via HTTPS, the tool will use the GITHUB_TOKEN environment variable (if available) to authenticate securely by rewriting the remote URL temporarily.

๐Ÿ“Ž Dependencies

  • term_size: For responsive terminal layout.
  • Standard Rust std::process, std::io, std::env, and std::net.

๐Ÿค Contributions

Pull requests and feedback are welcome! Please open an issue first to discuss any major changes.

Made with โค๏ธ in Rust.


Commit count: 0

cargo fmt