1. git init: 初始化本地仓库

  2. git clone: 克隆远程仓库

  3. git add: 添加文件到暂存区

  4. git commit: 提交代码到本地仓库

  5. git push: 推送代码到远程仓库

  6. git pull: 拉取远程仓库代码到本地

  7. git branch: 列出分支,创建分支

  8. git checkout: 切换分支

  9. git merge: 合并分支

  10. git status: 查看当前仓库状态

  11. git log: 查看提交历史

  12. git diff: 查看文件差异

  13. git reset: 回退到指定版本

  14. git stash: 暂存当前工作区

  15. git tag: 打标签

  16. git remote: 管理远程仓库

  17. git fetch: 从远程仓库获取最新代码

  18. git rebase: 变基,将一系列提交按照时间顺序重新排列

  19. git cherry-pick: 选择一个或多个提交应用于当前分支

  20. git submodule: 管理子模块

git常用命令

原文地址: http://www.cveoy.top/t/topic/bcC7 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录