-
-
Save jerrykrinock/6618003 to your computer and use it in GitHub Desktop.
Revisions
-
jerrykrinock revised this gist
Jun 30, 2017 . No changes.There are no files selected for viewing
-
jerrykrinock revised this gist
Jun 30, 2017 . No changes.There are no files selected for viewing
-
jerrykrinock revised this gist
Jun 30, 2017 . No changes.There are no files selected for viewing
-
jerrykrinock revised this gist
Jun 30, 2017 . No changes.There are no files selected for viewing
-
jerrykrinock revised this gist
Jun 30, 2017 . No changes.There are no files selected for viewing
-
jerrykrinock revised this gist
Jun 30, 2017 . No changes.There are no files selected for viewing
-
jerrykrinock revised this gist
Jun 30, 2017 . No changes.There are no files selected for viewing
-
jerrykrinock revised this gist
Sep 21, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ #!/bin/bash # This script create a new repo on github.com, then pushes the local repo from the current directory to the new remote. # It is a fork of https://gist.github.com/robwierzbowski/5430952/. Some of Rob's lines just didn't work for me, and to fix them I needed to make it more verbose so that a mere electrical engineer could understand it. -
jerrykrinock revised this gist
Sep 19, 2013 . 1 changed file with 39 additions and 13 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,25 +1,51 @@ #!/bin/bash # This script create a new repo on github.com, then pushes to it the local repo from the current directory. # It is a fork of https://gist.github.com/robwierzbowski/5430952/. Some of Rob's lines just didn't work for me, and to fix them I needed to make it more verbose so that a mere electrical engineer could understand it. # This script gets a username from .gitconfig. If it indicates that your default username is an empty string, you can set it with # git config --add github.user YOUR_GIT_USERNAME # Gather constant vars CURRENTDIR=${PWD##*/} GITHUBUSER=$(git config github.user) # Get user input echo "Enter name for new repo, or just <return> to make it $CURRENTDIR" read REPONAME echo "Enter username for new, or just <return> to make it $GITHUBUSER" read USERNAME echo "Enter description for your new repo, on one line, then <return>" read DESCRIPTION echo "Enter <return> to make the new repo public, 'x' for private" read PRIVATE_ANSWER if [ "$PRIVATE_ANSWER" == "x" ]; then PRIVACYWORD=private PRIVATE_TF=true else PRIVACYWORD=public PRIVATE_TF=false fi REPONAME=${REPONAME:-${CURRENTDIR}} USERNAME=${USERNAME:-${GITHUBUSER}} echo "Will create a new *$PRIVACYWORD* repo named $REPONAME" echo "on github.com in user account $USERNAME, with this description:" echo $DESCRIPTION echo "Type 'y' to proceed, any other character to cancel." read OK if [ "$OK" != "y" ]; then echo "User cancelled" exit fi # Curl some json to the github API oh damn we so fancy curl -u $USERNAME https://api.github.com/user/repos -d "{\"name\": \"$REPONAME\", \"description\": \"${DESCRIPTION}\", \"private\": $PRIVATE_TF, \"has_issues\": true, \"has_downloads\": true, \"has_wiki\": false}" # Set the freshly created repo to the origin and push # You'll need to have added your public key to your github account git remote add origin https://github.com/$USERNAME/$REPONAME.git git push -u origin master -
robwierzbowski renamed this gist
May 2, 2013 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
robwierzbowski revised this gist
Apr 21, 2013 . 1 changed file with 4 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,9 @@ #!/bin/bash # https://gist.github.com/robwierzbowski/5430952/ # Create and push to a new github repo from the command line. # Grabs sensible defaults from the containing folder and `.gitconfig`. # Refinements welcome. # Gather constant vars CURRENTDIR=${PWD##*/} -
robwierzbowski created this gist
Apr 21, 2013 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ #!/bin/bash # http://stackoverflow.com/questions/2423777/is-it-possible-to-create-a-remote-repo-on-github-from-the-cli-without-ssh/10325316#10325316 # Gather constant vars CURRENTDIR=${PWD##*/} GITHUBUSER=$(git config github.user) # Get user input read "REPONAME?New repo name (enter for ${PWD##*/}):" read "USER?Git Username (enter for ${GITHUBUSER}):" read "DESCRIPTION?Repo Description:" echo "Here we go..." # Curl some json to the github API oh damn we so fancy curl -u ${USER:-${GITHUBUSER}} https://api.github.com/user/repos -d "{\"name\": \"${REPONAME:-${CURRENTDIR}}\", \"description\": \"${DESCRIPTION}\", \"private\": false, \"has_issues\": true, \"has_downloads\": true, \"has_wiki\": false}" # Set the freshly created repo to the origin and push # You'll need to have added your public key to your github account git remote set-url origin git@github.com:${USER:-${GITHUBUSER}}/${REPONAME:-${CURRENTDIR}}.git git push --set-upstream origin master