forcegit

Crates.ioforcegit
lib.rsforcegit
version0.1.0
created_at2026-01-07 11:47:34.990124+00
updated_at2026-01-07 11:47:34.990124+00
descriptionSync .git directories to remote machines
homepagehttps://github.com/kushaldas/forcegit
repositoryhttps://github.com/kushaldas/forcegit
max_upload_size
id2028094
size26,049
Kushal Das (kushaldas)

documentation

https://github.com/kushaldas/forcegit

README

forcegit

A command-line tool to sync .git directories to remote machines via SSH.

Installation

cargo install --path .

Usage

Configure a directory

Run forcegit in a project directory to configure its remote:

cd myproject
forcegit
# Enter remote [user@]host:path: user@server:/home/user/myproject

If no user is specified, the current user is used.

Sync .git to remote

forcegit sync

This will:

  1. Create a tar archive of .git
  2. Copy it to the remote via scp
  3. Extract it on the remote, replacing any existing .git

Compare commits

forcegit diff

Shows the local and remote HEAD commits.

Shell autocompletion

# Bash
eval "$(forcegit auto bash)"

# Zsh
eval "$(forcegit auto zsh)"

# Fish
forcegit auto fish | source

Configuration

Configuration is stored in ~/.config/forcegit/config.toml:

[directories.myproject]
host = "server"
path = "/home/user/myproject"
user = "user"  # optional

License

MIT.

Commit count: 0

cargo fmt