1 unstable release
Uses new Rust 2024
| 0.1.0 | Jan 7, 2026 |
|---|
#2088 in Command line utilities
12KB
223 lines
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:
- Create a tar archive of
.git - Copy it to the remote via scp
- 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.
Dependencies
~2–13MB
~101K SLoC