dotfiles/symlinks/bin/git-explore-local

16 lines
198 B
Bash
Executable File

#!/bin/sh
TEMPDIR=$(mktemp -d)
if [ -z "$2" ]; then
# No branch defined
git clone --depth=1 $1 $TEMPDIR
else
# Branch defined
git clone --depth=1 -b $2 $1 $TEMPDIR
fi
cd $TEMPDIR
nvim .