create github repo with curl code example

Example 1: create github repo with curl

winpty curl -H 'Authorization: token [GENERATED_TOKEN]' https://api.github.com/user/repos -d '{"name":"[REPO_NAME_YOU_WANT]"}'

# follow steps here to generate token:
https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line

# note : you can add parameters to you command to set a description, switch to private, etc...

Example 2: repo from bitbucket to github

cd $HOME/Code/repo-directory
# Rename Origin to bitbucket
git remote rename origin bitbucket
# Add the origin of your new github repository
git remote add origin https://github.com/<username>/<repo-name>.git
# Push ypur branch master to your github repo
git push origin master
# Remove the old origin
git remote rm bitbucket

Example 3: post request using vue.js github repo

post request using vue.js github repo