dotfiles/.local/bin/scripts/git-backup

7 lines
169 B
Bash
Executable File

#!/bin/sh
# Creates a bare clone parallel to the current repository
p="$(basename "$(git rev-parse --show-toplevel)")"
builtin cd ..
git clone --mirror $p
builtin cd $p