跳至主要內容
kitlocal.dev

Git 速查表

本機執行

100% 在你的瀏覽器中處理。輸入與輸出絕不會離開你的裝置。

可搜尋的 Git 指令速查表:日常工作流程、復原與還原、工作樹 (worktree)、二分搜尋 (bisect)、部分檢出 (sparse-checkout) 等

  • First-time setup需要 Git 2.28+
    git config --global user.name "Your Name"
    git config --global user.email "you@example.com"
    git config --global init.defaultBranch main

    Identity used for every commit, and main as the default branch name for new repositories.

指令均已對照 Git 官方文件進行驗證。請將 <placeholders> 替換為你自己的值。