🍅 automatoes.com

Create a Repo and Push Your Code in a Single Command

Install Hub

You'll first need to install: github hub

brew install hub

Create a share funct

Then put the following an file/function named share:

# Creates a .gitignore file based on node:
curl -sLw "\n" https://www.toptal.com/developers/gitignore/api/node

git init
git add .
git commit -m "🎈"

# Creates the repo on Github
hub create $1

git push -u origin master

# Opens your browser to the new repo
hub browse

You can now run share in any directory to push all of the code to Github 🎉

Tags:

Contributor: [John Lindquist]

Referred in

edit
Create a Repo and Push Your Code in a Single Command