您的位置: 首页 > 文章 > git 代码 git 代码 分类: 文章 • 2023-12-12 17:05:58 克隆: git clone 仓库链接 添加到暂存区: git add . 提交到本地仓库: git commit -m ‘第n次提交’ 提交到远程仓库: git push 从远程仓库拉取: git pull 查询版本号: git branch 回退版本号: git reset --hard 版本号 git reset --hard HEAD^ (^代表回退几个版本) git reset --hard HEAD~1 查询文件是否在暂存区:git status