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操作一次就可以了

相关推荐
Ws_4 小时前
Git + Gerrit 第二课:diff、暂存区与撤销修改
git
snowjlz4 小时前
鸿蒙版SVN来了!!!
git·svn·版本控制
2401_876964136 小时前
27考研余炳森概率论|喻老李良2027资料网课
windows·git·考研·svn·eclipse·github·概率论
爱搬砖的狮子7 小时前
【Git】git repo下载使用
git
cheems952710 小时前
Git基本操作
git
Irissgwe10 小时前
三、Git 文件状态管理:add、commit、status 和 diff
git
Ws_15 小时前
Git + Gerrit 第三课:分支、切换与合并
git·elasticsearch
xlq2232215 小时前
6.git
git
Drache_long16 小时前
Git命令概述
git
console.log('npc')16 小时前
修改git中commit内容
git