Skip to content

Instantly share code, notes, and snippets.

@Haroenv
Last active August 29, 2015 14:20
Show Gist options
  • Save Haroenv/198960d6470c252fb7f2 to your computer and use it in GitHub Desktop.
Save Haroenv/198960d6470c252fb7f2 to your computer and use it in GitHub Desktop.
Bash function that creates a new repo
# new github repository #
# dependency: gem install hub #
# usage: new_repo <repo_name> #
# by @victormours #
###############################
function new_repo {
REPO_NAME=$1
if [ $REPO_NAME ]
then
mkdir $REPO_NAME
cd $REPO_NAME
git init
hub create
echo $REPO_NAME
else
echo "usage: new_repo <my_new_repo_name>"
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment