mirror of
https://github.com/PGYER/codefever.git
synced 2026-05-07 14:07:53 +08:00
* 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>
129 lines
3.7 KiB
Markdown
129 lines
3.7 KiB
Markdown
# Git 常用命令参考
|
|
|
|
### git
|
|
作用: 传入参数以完成 git 相关操作。
|
|
参照: [git](https://git-scm.com/docs/git)
|
|
|
|
### git config
|
|
作用: 查看和设置仓库设置和全局设置的设定
|
|
参照: [git config](https://git-scm.com/docs/git-config)
|
|
|
|
### git help
|
|
作用: 查看帮助选项
|
|
参照: [git help](https://git-scm.com/docs/git-help)
|
|
|
|
### git init
|
|
作用: 从当前目录初始化一个仓库
|
|
参照: [git init](https://git-scm.com/docs/git-init)
|
|
|
|
### git clone
|
|
作用: 复制一个仓库
|
|
参照: [git clone](https://git-scm.com/docs/git-clone)
|
|
|
|
### git add
|
|
作用: 添加文件内容到索引中
|
|
参照: [git add](https://git-scm.com/docs/git-add)
|
|
|
|
### git status
|
|
作用: 显示 `工作区` 状态
|
|
参照: [git status](https://git-scm.com/docs/git-status)
|
|
|
|
### git diff
|
|
作用: 查看 `commit` 之间或 `commit` 与 `工作区` 之间的差异
|
|
参照: [git diff](https://git-scm.com/docs/git-diff)
|
|
|
|
### git commit
|
|
作用: 记录仓库文件的变更
|
|
参照: [git commit](https://git-scm.com/docs/git-commit)
|
|
|
|
### git notes
|
|
作用: 添加或查看对象的文本记录
|
|
参照: [git notes](https://git-scm.com/docs/git-notes)
|
|
|
|
### git restore
|
|
作用: 重置工作区
|
|
参照: [git restore](https://git-scm.com/docs/git-restore)
|
|
|
|
### git reset
|
|
作用: 重置当前工作区到某一特定状态
|
|
参照: [git reset](https://git-scm.com/docs/git-reset)
|
|
|
|
### git rm
|
|
作用: 从工作区和索引中移除某个文件
|
|
参照: [git rm](https://git-scm.com/docs/git-rm)
|
|
|
|
### git mv
|
|
作用: 对文件、目录或者链接进行移动或重命名操作
|
|
参照: [git mv](https://git-scm.com/docs/git-mv)
|
|
|
|
### git branch
|
|
作用: 查看、删除、创建分支
|
|
参照: [git branch](https://git-scm.com/docs/git-branch)
|
|
|
|
### git checkout
|
|
作用: 切换分支或重置工作区
|
|
参照: [git checkout](https://git-scm.com/docs/git-checkout)
|
|
|
|
### git switch
|
|
作用: 切换分支
|
|
参照: [git switch](https://git-scm.com/docs/git-switch)
|
|
|
|
### git merge
|
|
作用: 将两个或多个开发历史合并
|
|
参照: [git merge](https://git-scm.com/docs/git-merge)
|
|
|
|
### git mergetool
|
|
作用: 运行解决冲突工具来解决合并冲突
|
|
参照: [git mergetool](https://git-scm.com/docs/git-mergetool)
|
|
|
|
### git log
|
|
作用: 显示提交记录
|
|
参照: [git log](https://git-scm.com/docs/git-log)
|
|
|
|
### git stash
|
|
作用: 隐藏工作区未被记录的修改
|
|
参照: [git stash](https://git-scm.com/docs/git-stash)
|
|
|
|
### git tag
|
|
作用: 查看、删除、创建标签
|
|
参照: [git tag](https://git-scm.com/docs/git-tag)
|
|
|
|
### git worktree
|
|
作用: 管理工作区
|
|
参照: [git worktree](https://git-scm.com/docs/git-worktree)
|
|
|
|
### git fetch
|
|
作用: 从其他仓库下载仓库更新记录
|
|
参照: [git fetch](https://git-scm.com/docs/git-fetch)
|
|
|
|
### git pull
|
|
作用: 从其他仓库或分支下载仓库更新记录并合并到当前分支
|
|
参照: [git pull](https://git-scm.com/docs/git-pull)
|
|
|
|
### git push
|
|
作用: 上传仓库更新记录
|
|
参照: [git push](https://git-scm.com/docs/git-push)
|
|
|
|
### git remote
|
|
作用: 管理远端仓库
|
|
参照: [git remote](https://git-scm.com/docs/git-remote)
|
|
|
|
### git submoudle
|
|
作用: 初始化、更新和查看子模块
|
|
参照: [git submoudle](https://git-scm.com/docs/git-submoudle)
|
|
|
|
### git cherry-pick
|
|
作用: 使用指定的变更记录来应用更改
|
|
参照: [git cherry-pick](https://git-scm.com/docs/git-cherry-pick)
|
|
|
|
### git rebase
|
|
作用: 从新的基础点应用提交的变更记录
|
|
参照: [git rebase](https://git-scm.com/docs/git-rebase)
|
|
|
|
### git revert
|
|
作用: 回滚已经提交的变更记录
|
|
参照: [git revert](https://git-scm.com/docs/git-revert)
|
|
|
|
### 其他命令
|
|
参照: [Git - Reference](https://git-scm.com/docs)
|