Skip to content

GIT还原大法 抹除之前记录 #100

Description

@lkzwc

git checkout --orphan new-branch # 创建无历史分支
git add -A # 添加当前文件
git commit -m "全新初始提交" # 新建初始提交‌:ml-citation{ref="1" data="citationList"}
git branch -D main # 删除原分支
git branch -m main # 重命名新分支
git push -f origin main # 强制覆盖远程‌:ml-citation{ref="1" data="citationList"}

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions