dotfiles/symlinks/bin/git-explore-local

16 lines
198 B
Plaintext
Raw Normal View History

2021-10-16 15:36:16 +00:00
#!/bin/sh
TEMPDIR=$(mktemp -d)
2021-11-09 14:37:52 +00:00
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
2021-10-16 15:36:16 +00:00
cd $TEMPDIR
nvim .