# 申請 Github 帳號,設定本地端 Git ###### tags: `前端筆記` - 最後修改: 2023-02-04 ## 常用指令 - [Github](https://github.com/) ,一個應用 Git 個功能提供雲端 repo 的服務,許多開放原始碼的程式專案使用它;有許多其他廠商提供的類似的服務,但目前的學習我們以 Github 為主要的練習平台。 - [Gitlab](https://gitlab.com/) 也有許多人或公司在使用,這邊僅列出做為參考。 ``` git config --global user.name "Github使用者名稱" git config --global user.email "Github使用者對應的Email" ``` 確認目前設定的 git 的使用者與 email ``` git config user.name && git config user.email ``` ## Githug ssh key 設定 參考[官網的說明](https://docs.github.com/en/authentication/connecting-to-github-with-ssh) ## 其他 - [git doc](https://git-scm.com/doc) - [10 Git Best Practices to Start Using in Your Next Git Commit](https://medium.com/patilswapnilv/10-git-best-practices-to-start-using-in-your-next-git-commit-5a43ae646e91) - [如何寫一個 Git Commit Message](https://blog.louie.lu/2017/03/21/%E5%A6%82%E4%BD%95%E5%AF%AB%E4%B8%80%E5%80%8B-git-commit-message/) - [送 PR 前,使用 Git rebase 來整理你的 commit 吧!](https://medium.com/starbugs/use-git-interactive-rebase-to-organize-commits-85e692b46dd) - [git worktree 簡單介紹與使用](https://louis383.medium.com/git-worktree-%E7%B0%A1%E5%96%AE%E4%BB%8B%E7%B4%B9%E8%88%87%E4%BD%BF%E7%94%A8-876897c797bf) 移除設定的 git 的使用者與 email ``` git config --global --unset user.name git config --global --unset user.email ``` 編輯 config 檔 ``` git config --global --edit ```