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

相关推荐
霜落花轻扬1 小时前
git相关命令
git
xlq223224 小时前
2.git
git
OYangxf4 小时前
Git Ignore
大数据·git·elasticsearch
哆哆啦004 小时前
obsidian远程同步方案:infiniCloud+remotely save方案
笔记·git·obsidian
西柚小萌新6 小时前
【计算机常识】--使用 Gitea 在本地/内网搭建 Git 私有服务器
服务器·git·gitea
zhangfeng11337 小时前
scp 命令的使用方法 什么软件支持 .git bash xshell .openssh
开发语言·git·bash
_君莫笑15 小时前
大厂Git使用规范
git
无心水1 天前
【Hermes:安全、权限与生产环境】39、智能体也会犯错?Hermes 纠错、回滚与遗忘机制全指南 —— 让 AI 的错误像 Git 一样可逆可控
人工智能·git·安全·mcp协议·openclaw·hermes·honcho
南境十里·墨染春水1 天前
linux学习进展 git详解
linux·git·学习
zhangfeng11331 天前
CodeBuddy ai对话框上面的git docs terminal Rulds 干嘛用的,以thinkphp fastadmin 为例,插件市场
人工智能·git·编程