git 发表于 2025-09-18 更新于 2025-09-28 分类于 git 查看当前分支git branch -- show-current 回退到上一个版本1git reset --hard HEAD~1 删除文件1git rm filename 删除分支1git branch -d branch_name 创建新分支12git checkout -b branch_namegit switch -c branch_name 回退到clone后的版本1git restore .