Git 命令速查表

Git Cheatsheet

Quick reference for common Git commands

git init

Initialize a new Git repository

Setup
git clone <url>

Clone a remote repository

Setup
git config --global user.name "name"

Set global username

Setup
git config --global user.email "email"

Set global email

Setup
git status

Show working tree status

Snapshot
git add <file>

Stage file changes

Snapshot
git add .

Stage all changes

Snapshot
git commit -m "message"

Commit staged changes

Snapshot
git reset <file>

Unstage a file

Snapshot
git reset --hard

Discard all uncommitted changes

Snapshot
git stash

Temporarily save changes

Snapshot
git stash pop

Restore stashed changes

Snapshot
git branch

List all local branches

Branch
git branch <name>

Create a new branch

Branch
git checkout <branch>

Switch to a branch

Branch
git checkout -b <branch>

Create and switch to branch

Branch
git branch -d <branch>

Delete a branch

Branch
git switch <branch>

Switch branches (modern)

Branch
git merge <branch>

Merge branch into current

Merge
git rebase <branch>

Rebase current branch

Merge
git cherry-pick <commit>

Apply specific commit

Merge
git remote -v

Show remote repositories

Remote
git remote add origin <url>

Add remote origin

Remote
git push origin <branch>

Push to remote

Remote
git pull

Pull from remote

Remote
git fetch

Fetch from remote without merging

Remote
git log --oneline

Compact commit history

Log
git log --graph

Branch graph history

Log
git diff

Show unstaged changes

Log
git diff --staged

Show staged changes

Log
git show <commit>

Show commit details

Log
git revert <commit>

Create new commit undoing changes

Undo
git reset HEAD~1

Undo last commit (keep changes)

Undo
git reset --hard HEAD~1

Undo last commit (discard changes)

Undo
git clean -fd

Remove untracked files

Undo
git tag

List all tags

Tag
git tag <name>

Create lightweight tag

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

Create annotated tag

Tag
git push --tags

Push tags to remote

Tag

什么是Git 命令速查表?

这是一款实用的在线工具,帮助您快速完成常见的数据处理和转换任务。所有处理都在浏览器本地完成,无需上传数据到服务器,确保您的内容安全私密。无论是专业人士处理工作、学生完成作业,还是普通用户日常使用,这个工具都能满足您的需求。

使用场景5个场景
  • 日常工作和学习
  • 数据处理和转换
  • 文件格式转换
  • 批量任务处理
  • 快速原型开发
如何使用?4
  1. 1打开工具页面
  2. 2输入或上传数据
  3. 3点击处理按钮
  4. 4查看并复制结果
功能特点8个特点
  • 免费使用
  • 无需注册
  • 浏览器本地处理
  • 数据安全
  • 响应式设计
  • 一键操作
  • 实时处理
  • 多设备支持
常见问题6个问题
Git 命令速查表 是什么?

一款在线Git 命令速查表,快速、安全、易用。支持多种输入格式,处理完成后可一键复制或下载。所有操作在浏览器本地完成,数据不会上传。

Git 命令速查表免费吗?

是的,完全免费使用,无需注册或登录。打开网页即可使用所有功能。

我的数据会被上传吗?

不会。所有处理都在您的浏览器本地完成,数据不会离开您的设备。

可以在手机上使用吗?

可以。我们的工具采用响应式设计,在手机、平板和电脑上都能正常使用。

处理速度怎么样?

对于常规大小的数据,处理通常在瞬间完成。大数据量可能需要几秒钟,具体时间取决于您的设备性能。

需要联网才能使用吗?

页面首次加载需要网络,加载完成后所有处理都在本地完成,可以离线使用。