删除sourcetree中的等待推送 [英] remove waiting push in sourcetree

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

问题描述

我犯了我不想推送的文件。
我还没有推动,但我怎么能删除提交。



这是它的样子:





是选项:





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

解决方案

要在不更改任何源代码的情况下移除提交,您需要执行混合重置。



右键单击最后一个良好提交可能会是 origin / master )。选择重置当前分支到此提交。





在结果对话框中,从下拉列表中选择Mixed ...,然后点击OK。



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


I committed files that I don't want to push. I didn't push yet but how can I remove the commit.

This is how it looks:

This are the options:

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.

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天全站免登陆