# Day 12 - Create Repo & Git ## 前言 依照習慣,會在建立`初版`或是`template`的時候,就創Repo,Push Local code to Repo,並用Git做版控。 而這次的SideProject-桌球王是建立好初版後(並format code by prettier)決定push。 >目前還沒建立**前端的萬用template**,希望未來有自己的一版! ## Repo 放 GitHub 也有看其他人放GitLab,但目前沒有在那建立帳號。 所以就以習慣的GitHub為出發。 省略Create 的 GUI 操作,接著依照下面圖,部分在local teminal 打指令初始化Git Repo並push. ![](https://hackmd.io/_uploads/By4jb6-ea.png) > git init // Initialized empty Git repository in BlaBla > git add . > git commit -m "初版" > git branch -M main > git remote add origin https://github.com/goish135/table-tennis-king.git > git push -u origin main ![](https://hackmd.io/_uploads/Syy9Epbga.png) ### Check GitHub page init Status (最後確認有無push成功) ![](https://hackmd.io/_uploads/HkFJ86Wl6.png) ## Repo url - https://github.com/goish135/table-tennis-king/blob/main/src/App.js