開發輔助

Git 速查表 - 常用命令快速參考

免費線上 Git 速查表,按分類整理的可搜尋命令參考。快速查詢分支、合併、變基、暫存、重置等 Git 命令。

免費使用 無需註冊 在瀏覽器中執行

工具工作區

Setup & Config

git init

Initialize a new Git repository in the current directory

--bare
git clone <url>

Clone a remote repository to your local machine

--depth 1--branch <name>--recurse-submodules
git config user.name "<name>"

Set the author name for commits

--global--local--list
git config user.email "<email>"

Set the author email for commits

--global--local

Staging & Commits

git add <file>

Stage a file for the next commit

-A-p.
git commit -m "<message>"

Create a commit with a message

--amend--no-edit-a--allow-empty
git status

Show the working tree status

-s--short
git diff

Show unstaged changes

--staged--cached--stat--name-only
git log

Show commit history

--oneline--graph--all-n <number>--author=<name>

Branching & Merging

git branch

List, create, or delete branches

-a-d <branch>-D <branch>-m <new-name>
git checkout <branch>

Switch to a branch or restore files

-b <new-branch>--
git switch <branch>

Switch to a branch (modern alternative to checkout)

-c <new-branch>--detach
git merge <branch>

Merge a branch into the current branch

--no-ff--squash--abort
git rebase <branch>

Reapply commits on top of another branch

-i--onto--abort--continue

Remote

git remote -v

List remote repositories with URLs

add <name> <url>remove <name>rename <old> <new>
git fetch

Download objects and refs from a remote

--all--prune<remote>
git pull

Fetch and integrate changes from a remote branch

--rebase--no-rebase<remote> <branch>
git push

Upload local commits to a remote repository

-u origin <branch>--force--tags--delete <branch>

Stash

git stash

Temporarily save uncommitted changes

-u--include-untracked-m "<message>"
git stash pop

Apply the most recent stash and remove it from the list

git stash list

List all stashed changes

git stash drop

Remove a specific stash entry

stash@{n}
git stash apply

Apply a stash without removing it from the list

stash@{n}

Undo & Reset

git reset <file>

Unstage a file while preserving changes

--soft HEAD~1--mixed HEAD~1--hard HEAD~1
git revert <commit>

Create a new commit that undoes a previous commit

--no-commit-n
git restore <file>

Discard changes in the working directory

--staged--source=<commit>
git clean -fd

Remove untracked files and directories

-n (dry run)-x-i

Inspection

git log --oneline

Show compact commit history (one line per commit)

git log --graph --all

Visualize branch history as a graph

git show <commit>

Display details and diff of a specific commit

git blame <file>

Show who last modified each line of a file

git reflog

Show a log of all reference updates (useful for recovery)

git shortlog -sn

Summarize commit counts by author

Tags

git tag <name>

Create a lightweight tag at the current commit

git tag -a <name> -m "<msg>"

Create an annotated tag with a message

git tag -l

List all tags

"v1.*"
git push origin <tag>

Push a specific tag to a remote

--tags
git tag -d <name>

Delete a local tag

什麼是Git 速查表 - 常用命令快速參考?

Git 速查表 - 常用命令快速參考是一款可直接在瀏覽器中使用的實用工具。免費線上 Git 速查表,按分類整理的可搜尋命令參考。快速查詢分支、合併、變基、暫存、重置等 Git 命令。它適合處理日常工作、學習、開發和資料整理中的具體任務,無需安裝額外軟體;在工具支援的情況下,輸入內容會保留在目前裝置中處理。

如何使用Git 速查表 - 常用命令快速參考

  1. 1在工具區域貼上、輸入或上傳需要處理的內容。
  2. 2根據任務選擇格式、尺寸、輸出方式或驗證選項。
  3. 3檢查預覽結果、提示資訊或轉換後的資料。
  4. 4確認結果無誤後再複製或下載,用於後續工作。

Git 速查表 - 常用命令快速參考的常見使用情境

快速完成日常任務

無需安裝桌面軟體,打開網頁即可處理常見的文字、圖片、資料或格式轉換工作。

檢查與整理內容

在提交檔案、發布內容或複製結果之前,快速發現格式問題並取得結構清楚的輸出。

重視隱私的瀏覽器處理

對於支援本機執行的工具,資料會留在目前瀏覽器中,不需要上傳到第三方服務。

常見問題

Git 速查表 - 常用命令快速參考可以解決什麼問題?

免費線上 Git 速查表,按分類整理的可搜尋命令參考。快速查詢分支、合併、變基、暫存、重置等 Git 命令。

這個工具需要註冊或付費嗎?

不需要。你可以直接免費使用,不必建立帳號。

工具會上傳我的資料嗎?

工具會盡可能在瀏覽器本機執行。需要後端服務的功能會在頁面上明確標示。