Created
June 26, 2018 22:12
-
-
Save nictuku/f3d0695604399ee873a7e26e43ba0ed5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function clone() { | |
repo=$1 # https://github.com/fatih/vim-go.git | |
dest=$2 # ~/.vim/pack/plugins/start/vim-go | |
mkdir -p $dest | |
cd $dest | |
git init | |
if ! git config remote.origin.url &> /dev/null;then | |
git remote add origin $repo | |
fi | |
git fetch origin master | |
git reset origin/master # --hard to wipe everything but that's dangerous | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment