Skip to content

Instantly share code, notes, and snippets.

@sampletext32
Last active November 18, 2020 01:50
Show Gist options
  • Save sampletext32/85e11625d929d1acc0ea935383576398 to your computer and use it in GitHub Desktop.
Save sampletext32/85e11625d929d1acc0ea935383576398 to your computer and use it in GitHub Desktop.
Bash snippet to create github repo from existing VS project folder
git init
curl https://raw.githubusercontent.com/github/gitignore/master/VisualStudio.gitignore --output .gitignore
git add .gitignore
git commit -m "Add .gitignore"
git add .
git commit -m "Add project"
get_reponame() { echo `basename $(git rev-parse --show-toplevel)`; }
hub create sampletext-projects/`get_reponame`
git push -u origin HEAD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment