3 ms·
This is really cool, and has inspired the latest function to be added to my zshrc: vscodetmp () { local repo=$1 [[ ! $repo =~ "https://*" ]] && repo=
by wrboyce 6y ago
This is really cool, and has inspired the latest function to be added to my zshrc:
vscodetmp () {
local repo=$1
[[ ! $repo =~ "https://*" ]] && repo="https://github.com/${repo}"
local temp="$(mktemp -d)"
git clone "${repo}" "${temp}"
code --wait -n "${temp}"
rm -rf "${temp}"
}
- jasonlfunk 6y agoI love this, thanks.
- thepete2 6y agoNow you need a function to move it to a permanent location if you like the project and want to keep it or contribute.
- gbraad 6y agoGitpod.io
- jeffreygoesto 6y agoWhy not "--single-branch" when cloning? Couldn't it speed up cloning if there are many branches?
- Tobu 6y ago--depth=1 (shallow clone, and implies --single-branch)