dotfiles/symlinks/bin/git-explore-local

16 lines
198 B
Text
Raw Normal View History

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