Skip to content

Instantly share code, notes, and snippets.

@resistorsoftware
Forked from lsegal/push_initial_commit.sh
Created September 22, 2010 21:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save resistorsoftware/592648 to your computer and use it in GitHub Desktop.
Save resistorsoftware/592648 to your computer and use it in GitHub Desktop.
#
# Create a new repo on Github and directly push your initial commit with this shell script
#
url=https://github.com/api/v2/json/repos/create
username=$(git config github.user)
token=$(git config github.token)
name=${1-$(basename $(pwd))}
curl -F login=$username -F token=$token $url -F name=$name -F public=1 1>/dev/null
git remote add origin git@github.com:$username/$name
git push
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment