Github basic

Inhwa M.
Sep 23, 2021
  1. VS Code terminal: go to the project folder you will upload to github
  2. VS Code terminal: git init
  3. create a new repository in Github
    recommend! make the name of repository the same “name” of package.json file
  4. VS Code terminal:
    git remote add origin ‘repository address’
    git add .
    git commit -m “1.0 Initialization”
    git push origin master
  5. Github repository refresh to check if all the files are uploaded.

Deploying to Github pages

  1. VS Code terminal: npm i gh-pages
  2. package.json:
    “homepage” : “https://inhwam.github.io/'name of repository’”
    “scripts”: add below
    “deploy” : “gh-pages -d build”
    “predeploy” : “npm run build”
  3. VS Code terminal:
    npm run build
    npm run deploy

If you make any changes in files, run npm run deploy again.

--

--

Inhwa M.

Graduate student of CS, My study notes for programming