Skip to main content

Module git

Module git 

Source
Expand description

Thin wrapper over the system git binary. Thin wrapper over the system git binary.

We deliberately shell out instead of pulling in a Rust git library (gix etc.): users already have SSH agents, signing keys, credential helpers and ssh config configured for the git they use elsewhere, and it is futile to reimplement that surface.

Functionsยง

add_all
git add -A.
commit
git commit -m <message>. Returns Ok(()) if there was nothing to commit.
init
Initialises a git repository at dir and writes a sensible .gitattributes that marks *.age as binary so git does not try to diff ciphertext.
is_repo
Returns true if dir contains a .git directory or file.
log
git log -n <n> --oneline.
pull_rebase
git pull --rebase --autostash.
push
git push.
status
git status -sb.