git常用命令
-
git init: 初始化本地仓库
-
git clone: 克隆远程仓库
-
git add: 添加文件到暂存区
-
git commit: 提交代码到本地仓库
-
git push: 推送代码到远程仓库
-
git pull: 拉取远程仓库代码到本地
-
git branch: 列出分支,创建分支
-
git checkout: 切换分支
-
git merge: 合并分支
-
git status: 查看当前仓库状态
-
git log: 查看提交历史
-
git diff: 查看文件差异
-
git reset: 回退到指定版本
-
git stash: 暂存当前工作区
-
git tag: 打标签
-
git remote: 管理远程仓库
-
git fetch: 从远程仓库获取最新代码
-
git rebase: 变基,将一系列提交按照时间顺序重新排列
-
git cherry-pick: 选择一个或多个提交应用于当前分支
-
git submodule: 管理子模块
原文地址: http://www.cveoy.top/t/topic/bcC7 著作权归作者所有。请勿转载和采集!