git rebase回退到根

项目初始有2个commit,git rebase -i 合并提交记录只能看到一个最新的,

需要git rebase -i --root才能看到第一个提交

git rebase -i -root以后,编辑提交信息,然后就可以了。

之前本地调试的时候经过多次实验性操作,导致git rebase -i -root以后,

查看git stash 是 Not currently on any branch

*(no branch)

master

这样,解决方法是

git branch temp 新建个分支

git checkout master

git branch -D temp 强制删除了temp分支,

然后再git rebase -i -root操作一次就可以了

相关推荐
Doris_LMS1 天前
Git的强软硬回退(三)
运维·服务器·数据库·git·idea
瓜酷月..1 天前
GIT(了解)
git
misty youth1 天前
git命令常用指南
git·github
持续迷茫2 天前
lint-staged 中 --verbose 选项的深度解析
前端·git
lostElk2 天前
团队 Git 分管理全流程规范
git·github
亦是行人!2 天前
删除git中已经提交的target、logs、.idea文件
git
匆叔2 天前
Git下载全攻略
前端·git
奇树谦2 天前
Git配置:禁用全局HTTPS验证
git·网络协议·https
小安同学iter2 天前
在idea当中git的基础使用
git
初级代码游戏2 天前
Git或TortoiseGit的小BUG(可解决):空库报错Could not get hash of ““
git·bug