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

相关推荐
独隅2 小时前
Git误操作急救手册
大数据·git·elasticsearch
水无痕simon2 小时前
03 Git 工作流程
git
一个程序猿老马3 小时前
013、推送与拉取:git push与git pull的协作流程
大数据·git·elasticsearch
每天进步一点点️5 小时前
GIT - 常用命令合辑
git
csdn_aspnet5 小时前
Git Submodule深度避坑指南,破解子模块同步混乱、版本漂移、CI失败等高频协作痛点
git·ci/cd·submodule·checklist·detached·subtree
一个程序猿老马5 小时前
011、更优雅的合并:git rebase变基操作详解
git
zhensherlock9 小时前
Protocol Launcher 系列:Working Copy 文件操作与高级命令详解
javascript·git·typescript·node.js·自动化·github·js
摆烂z1 天前
AI同时完成多个功能(Git WorkTree)
git
___波子 Pro Max.1 天前
Git Worktree 可视化理解指南
git
happymaker06261 天前
git使用快速入门
git