Automate creating GitHub Repository process and push first commit, then open the project with Visual Studio Code.
cd ~
git clone https://github.com/yikeda6616/create-gh
cd create-gh
yarn
vi ~/create-gh/.env # Edit .env
Type your GitHub account
USERNAME=
PASSWORD=
vi ~/create-gh/.create-gh.sh # Edit .create-gh.sh
function create() {
cd ~/create-gh # Change directory as you like
yarn start $1
cd ~/Desktop # Change directory as you like
git clone https://github.com/<github-username>/$1 # Change here to your GitHub username
cd $1
echo \# $1 > README.md
git add .
git commit -m "Initial commit"
git push
code .
}
Add the line below to your .zshrc
source ~/create-gh/.create-gh.sh
Relogin to Shell after editing .zshrc
$ exec $SHELL -l
create <your-project-name>