删除 SourceTree 中的等待推送 [英] Remove waiting push in SourceTree

查看:164
本文介绍了删除 SourceTree 中的等待推送的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我提交了不想推送的文件.我还没推.

I committed files that I don't want to push. I didn't push yet.

如何删除提交?

我的屏幕是这样的:

这些是选项:

我不想撤销对源代码的任何更改!

I don't want to undo any changes to the source code!

推荐答案

要删除提交而不更改任何源代码,您需要执行混合"重置.

To remove the commit without changing any source code, you need to perform a "mixed" reset.

右键单击最后一个好的"提交(这可能是 origin/master).选择将当前分支重置为此提交".

Right click on the last "good" commit (this will probably be origin/master). Select "Reset current branch to this commit."

在出现的对话框中,从下拉列表中选择混合...",然后单击确定".

In the resulting dialog, select "Mixed..." from the drop down and click OK.

您的工作副本将保持不变(不会更改任何文件),但索引将被重置,这意味着 之后的所有提交都将从您的历史记录中删除.

Your working copy will remain the same (no files will be changed) but the index will be reset, meaning that all commits after the selected one will be removed from your history.

这篇关于删除 SourceTree 中的等待推送的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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