如何使用 tortoisegit 执行变基(壁球) [英] How to perform rebase (squash) using tortoisegit

查看:173
本文介绍了如何使用 tortoisegit 执行变基(壁球)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

无法获得如何为当前分支执行壁球变基.控制台命令是

Cannot get how to perform squash rebase for the current branch. The console command would be

git rebase -i HEAD~2

然后像往常一样挤压.但是如何在 TGit 中做同样的事情?

and then squash as usually. But how to do the same in TGit?

初始化案例的脚本

git init .
touch 1
git add 1
git commit -m "1"
touch 2
git add 2
git commit -m "2"
touch 3
git add 3
git commit -m "3"

因此,在压缩之后,我们将有 3 个文件的 1 个提交.

As a result after squashing we would have 1 commit with 3 files.

有什么建议吗?

推荐答案

您可以使用 GUI 组合两个相邻的提交,如下所示.请记住不要合并共享存储库中已有的提交.看:

You can combine two adjacent commits using the GUI as follows. Remember not do combine commits already on the shared repository. See:

这篇关于如何使用 tortoisegit 执行变基(壁球)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆