Git 裡查看 configuration
在 Git 裡查看 configuration (設定) 有幾種常用方式,依照範圍不同可以看到不同層級的設定:
git config --list
或者:
git config -l
會列出 Git 目前使用的所有設定(包含系統、全域、專案)。Git 的設定分成三層:
git config --system --list
git config --global --list
git config --local --list
/etc/gitconfig~/.gitconfig.git/configcat ~/.gitconfig
cat .git/config
如果只想看某一個 key,例如使用者名稱:
git config user.name
git config user.email
| File14 | File | Last Modified |
|---|---|---|
| 把目前repo 所有的branch都push 到github | 把目前repo 所有的branch都push 到github | 2:24 PM - January 12, 2026 |
| 把目前 branch 上的修改(尚未 commit 的檔案)直接帶到一個新的 branch | 把目前 branch 上的修改(尚未 commit 的檔案)直接帶到一個新的 branch | 2:24 PM - January 12, 2026 |
| 從 Windows 把 repo 搬到 WSL再一次性 push 所有 branch 到GitHub 這樣就能避開 aux 檔名問題 | 從 Windows 把 repo 搬到 WSL再一次性 push 所有 branch 到GitHub 這樣就能避開 aux 檔名問題 | 2:24 PM - January 12, 2026 |
| git指定初始化的 branch 名稱 | git指定初始化的 branch 名稱 | 2:24 PM - January 12, 2026 |
| github上的repo clone下來check out 某一個dev branch | github上的repo clone下來check out 某一個dev branch | 2:24 PM - January 12, 2026 |
| github一台電腦同時使用兩個 GitHub 帳號 | github一台電腦同時使用兩個 GitHub 帳號 | 2:24 PM - January 12, 2026 |
| github actions | github actions | 2:24 PM - January 12, 2026 |
| git 重新再從github上pull 所有branch | git 重新再從github上pull 所有branch | 2:24 PM - January 12, 2026 |
| git 恢復到最近一次 git pull狀態,取消本地修改 | git 恢復到最近一次 git pull狀態,取消本地修改 | 2:24 PM - January 12, 2026 |
| git 初始化與推送流程圖 | git 初始化與推送流程圖 | 2:24 PM - January 12, 2026 |
| git 中查看commit歷史資訊 | git 中查看commit歷史資訊 | 2:24 PM - January 12, 2026 |
| git 中修改檔名且保留原來commit紀錄 | git 中修改檔名且保留原來commit紀錄 | 2:24 PM - January 12, 2026 |
| git Remote 常見情境與操作 | git Remote 常見情境與操作 | 2:24 PM - January 12, 2026 |
| git GUI tool, SourceTree | git GUI tool, SourceTree | 2:24 PM - January 12, 2026 |