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

相关推荐
IOT那些事儿10 小时前
Git报错:Could not get HEAD hash
git·hash·head
杜哥无敌13 小时前
Git Bash + acme.sh 实现 SSL 证书自动续签(完整指南)
git·bash·ssl
nunumaymax16 小时前
Git教程
git
阿萨德528号17 小时前
IDEA 项目 SVN 配置消失、版本控制变成 Git 且无 VCS 菜单的解决办法
git·svn·intellij-idea
R²AIN SUITE20 小时前
项目管理平台怎么和OA、钉钉、飞书、Git仓库打通?从消息通知到双向同步的5种实现路径
git·钉钉·飞书
Demons_kirit1 天前
CTFHub 信息泄露通关笔记:Git泄露 Log - 教程
笔记·git·网络安全
鬼手点金2 天前
构建有效 Agent 的核心原则
java·人工智能·git·学习·自动化
索西引擎2 天前
Git 大文件阻断推送的成因与历史重写修复
git
csdn2015_2 天前
git 合并分支
大数据·git·elasticsearch
9144062322 天前
mac Git 账户切换问题
git·macos