创建一个提交,保存它,不要推送它,而不是创建更多的提交,而不是推送第一个提交 [英] create a commit, save it, don;t push it than create some few more commits , push them than push the first commit

查看:110
本文介绍了创建一个提交,保存它,不要推送它,而不是创建更多的提交,而不是推送第一个提交的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我想保存提交,说 commit-1 但又不想推送它,然后又提交了几次提交(我也已经推送了),该怎么办呢?想推送 commit-1 吗?

What if I want to save a commit say commit-1 but don;t want to push it and then after few commits,which I have pushed also, then I want to push that commit-1 ?

推荐答案

您想重新排序

您可以使用 git rebase --interactive 来实现。不过,请务必阅读有关使用此功能的陷阱。正确使用它是非常强大的。

You can do that using git rebase --interactive. Be sure to read about the pitfalls of using this, though. Used correctly it is very powerful.

这篇关于创建一个提交,保存它,不要推送它,而不是创建更多的提交,而不是推送第一个提交的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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