Last active
April 23, 2021 15:57
-
-
Save apolopena/f070a67339052669b43b46e463ce4081 to your computer and use it in GitHub Desktop.
zsh function snippet to setup a local and remote github repository using `gitpod-laravel-starter` as the starting point
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
# zsh function snippet | |
# | |
# Creates a new project from the repo https://github.com/apolopena/gitpod-laravel8-starter | |
# Assumes that you already have a blank repo created for this new project in your github account | |
# Assumes that you want to use https instead of ssh | |
# $1: new repo name to clone into and push to remote (the default branch will be called main) | |
# $2: GitHub username | |
# new repo name must match the name of the blank repo you have created in github for this project. | |
__new_repo_project_name="$1"; __github_username="$2"; mkdir "$__new_repo_project_name" && cd "$__new_repo_project_name" && git clone https://github.com/apolopena/gitpod-laravel8-starter.git . && rm -rf .git && git init && git add -A && git commit -m "initial commit built from https://github.com/apolopena/gitpod-laravel8-starter" && git remote add origin "https://github.com/$__github_username/$__new_repo_project_name.git" && git branch -m main && git push -u origin main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment