增添rebase的使用案例

main
XYYR-C 1 year ago
parent 361488a773
commit 5b9c74407b

@ -178,3 +178,23 @@ git push//推送到远程仓库
如果出现这个,不会发生文件的变化,一定有地方错了(比如忘记提交到版本库)
![image-20240427142157444](https://telegraph-image-5jy.pages.dev/file/96ec503cca5adf3bf977e.png)
5. git rebase 删除commit的使用方法
由于小组修改READEME.md出现过多的无用记录尝试删除掉这些记录。
![image-20240427233112146](https://telegraph-image-5jy.pages.dev/file/6ec2b192742861f292f51.png)
1先git pull 拉取
2git rebase -i hashhash是要保留的那一次的提交的值
3解决冲突就是把它冲突的地方删除掉然后addcommit
4解决冲突解决后git rebase --continue
5git push到远程。
成功删掉了一串无用且重复的README的更新消息
![image-20240428000607940](https://telegraph-image-5jy.pages.dev/file/a6eb659aa96ae6b38f0c0.png)
Loading…
Cancel
Save