git init 初始化當前目錄的 gitgit add --all 將所有檔案加入 git 版控git commit -m "first push to repo" 提交第一次的 commitgit remote add origin git@github.com:<YOUR_GITHUB_USER_NAME>/<YOUR_GITHUB_REPO_NAME>.git 將本機的 public 資料夾與剛剛創建的 repo 千里一線牽git push -u origin main 將本機的 public 資料夾下的所有內容,通通 push 到剛剛創建的 repogit 指令 就能將更新的內容 push 到 github repo 囉!git stash, git stash apply, git rebase 等等,不小心操作錯誤了也不用慌,反正有 commit 就一定會留下蠢蠢的紀錄,逃不掉的啦?!