Files
codefever/doc/en-us/git/git_command_reference.md
Carney Wu d3de96487f initial version (#1)
* fix(Useless Code): remove useless code

* feat(Deploy Scripts): add deploy scripts

* fix(Delopy Script): change settings

* fix(Deploy Script): fix ssh-keygen script

* fix(Deploy Script): change env file path

* feat(Deploy Script): add db migration

* fix(Deploy script): change script

* feat(Deploy Script): add sql file to create database

* fix(Deploy Script): add composer support

* fix(Deploy Script): add composer

* fix(Service Script): add http gateway

* fix(Deploy Script): add git path

* fix(Deploy Script): fix setting bugs

* fix(Init Script): get user from config

* fix(Service): adjust run users

* feat(Doc): add doc

* fix(Doc): change docs

* fix(Deploy script): change owner of storage path

* feat: codefever-community documentation system

* fix(Doc): doc details page style

* feat: fix page navigation

* fix(SQL File): fix db file fit MySQL 5.7

* fix(FileTree): empty repository display

* fix: fix helper navigation

* docs(zh-cn essential part):

* fix(Doc Style): change markdown.css

* docs(contribution doc):

* fix: unified page style

* docs(Readme): add readme

* build(Build):

Co-authored-by: cubic <carneywu@pgyer.com>
Co-authored-by: pololi <pololi@pgyer.com>
Co-authored-by: yangchen <chenyang@pgyer.com>
2022-01-19 17:21:59 +08:00

3.7 KiB

Git 常用命令参考

git

作用: 传入参数以完成 git 相关操作。
参照: git

git config

作用: 查看和设置仓库设置和全局设置的设定
参照: git config

git help

作用: 查看帮助选项
参照: git help

git init

作用: 从当前目录初始化一个仓库
参照: git init

git clone

作用: 复制一个仓库
参照: git clone

git add

作用: 添加文件内容到索引中
参照: git add

git status

作用: 显示 工作区 状态
参照: git status

git diff

作用: 查看 commit 之间或 commit工作区 之间的差异
参照: git diff

git commit

作用: 记录仓库文件的变更
参照: git commit

git notes

作用: 添加或查看对象的文本记录
参照: git notes

git restore

作用: 重置工作区
参照: git restore

git reset

作用: 重置当前工作区到某一特定状态
参照: git reset

git rm

作用: 从工作区和索引中移除某个文件
参照: git rm

git mv

作用: 对文件、目录或者链接进行移动或重命名操作
参照: git mv

git branch

作用: 查看、删除、创建分支
参照: git branch

git checkout

作用: 切换分支或重置工作区
参照: git checkout

git switch

作用: 切换分支
参照: git switch

git merge

作用: 将两个或多个开发历史合并
参照: git merge

git mergetool

作用: 运行解决冲突工具来解决合并冲突
参照: git mergetool

git log

作用: 显示提交记录
参照: git log

git stash

作用: 隐藏工作区未被记录的修改
参照: git stash

git tag

作用: 查看、删除、创建标签
参照: git tag

git worktree

作用: 管理工作区
参照: git worktree

git fetch

作用: 从其他仓库下载仓库更新记录
参照: git fetch

git pull

作用: 从其他仓库或分支下载仓库更新记录并合并到当前分支
参照: git pull

git push

作用: 上传仓库更新记录
参照: git push

git remote

作用: 管理远端仓库
参照: git remote

git submoudle

作用: 初始化、更新和查看子模块
参照: git submoudle

git cherry-pick

作用: 使用指定的变更记录来应用更改
参照: git cherry-pick

git rebase

作用: 从新的基础点应用提交的变更记录
参照: git rebase

git revert

作用: 回滚已经提交的变更记录
参照: git revert

其他命令

参照: Git - Reference