Last active
November 18, 2020 01:50
-
-
Save sampletext32/85e11625d929d1acc0ea935383576398 to your computer and use it in GitHub Desktop.
Bash snippet to create github repo from existing VS project folder
This file contains 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
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