Git: Add gre.

This commit is contained in:
Dmitry Voronin 2024-12-22 06:39:39 +03:00
parent 2c6c123569
commit f98d53834d
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k

View file

@ -151,6 +151,14 @@ function grs() {
git restore --staged "${target}" git restore --staged "${target}"
} }
# Restore changes.
# Usage: gre [FILES]
function gre() {
local target=${@}
[[ ${target} == "" ]] && target="."
git restore "${target}"
}
# Run git garbage collection. # Run git garbage collection.
function ggc() { function ggc() {
git gc --aggressive --no-cruft --prune=now git gc --aggressive --no-cruft --prune=now