📝
Git 备忘录
Git命令快速参考Git命令的综合参考工具。搜索和复制Git命令及其描述、使用示例和分类。
搜索命令:
Git 命令:
基础操作6 命令
命令 | 描述 | 用法 |
---|---|---|
git init | 初始化一个新的Git仓库 | git init [repository-name] |
git clone | 克隆远程仓库到本地 | git clone <repository-url> |
git add | 将文件添加到暂存区 | git add <file> 或 git add . |
git commit | 提交暂存区的更改 | git commit -m "commit message" |
git status | 查看仓库状态 | git status |
git log | 查看提交历史 | git log [--oneline] [--graph] |
远程操作3 命令
命令 | 描述 | 用法 |
---|---|---|
git push | 推送到远程仓库 | git push origin [branch-name] |
git pull | 从远程仓库拉取更新 | git pull origin [branch-name] |
git remote | 管理远程仓库 | git remote add origin <url> |
分支操作3 命令
命令 | 描述 | 用法 |
---|---|---|
git branch | 查看、创建或删除分支 | git branch [branch-name] |
git checkout | 切换分支或恢复文件 | git checkout [branch-name] 或 git checkout -- <file> |
git merge | 合并分支 | git merge [branch-name] |
撤销操作2 命令
命令 | 描述 | 用法 |
---|---|---|
git reset | 重置提交历史 | git reset [--soft|--mixed|--hard] [commit] |
git revert | 撤销指定的提交 | git revert [commit] |
标签操作1 命令
命令 | 描述 | 用法 |
---|---|---|
git tag | 创建、列出或删除标签 | git tag [tag-name] |
配置操作1 命令
命令 | 描述 | 用法 |
---|---|---|
git config | 设置Git配置 | git config --global user.name "Your Name" |
📖 使用指南
搜索命令
使用搜索框查找特定的Git命令
浏览分类
命令按分类组织,便于导航
复制使用
点击复制按钮在终端中使用命令
✨ 功能特点
📚
综合参考专业工具,具有先进功能
🔍
智能搜索实时处理,即时显示结果
📋
快速复制一键复制功能,便于分享
📖
分类组织本地处理,确保完全隐私
🔬技术介绍
核心概念Git是一个分布式版本控制系统。命令按分类组织:基础操作、分支管理、远程操作、撤销操作、标签和配置。
Git 工作流典型的Git工作流包括创建分支、提交更改,然后将更改合并回主分支。
最佳实践提交前总是检查git status。使用描述性的提交信息。为新工作创建功能分支。定期使用pull和push与远程仓库同步。