oracle如何撤回已提交,pycharm撤回已经push但未commit的文件

Undo the last commit

PyCharm allows you to undo the last commit in the current branch (i.e. HEAD):

Open the Version Control tool window (Alt+9) and switch to the Log tab.

Select the last commit in the current branch and choose Undo Commit from the context menu.

In the dialog that opens, select a changelist where the changes you are going to discard will be moved. You can either select an existing changelist from the Name drop-down list, or specify the name of a new changelist (the commit message is used by default).

Select the Set active option if you want to make the changelist with the changes you are about to discard the active changelist.

Select the Track context option if you want PyCharm to remember your context and reload currently opened files in the editor when this changelist becomes active.

You cannot undo a commit if it was pushed to a protected branch, i.e. a branch to which force --push is not allowed (configure protected branches in the Settings/Preferences dialog (Ctrl+Alt+S) under Version Control | Git).

其实说的已经很清楚了。这里加一张图说明吧:

撤回操作

首先alt + 9 >> log >> 右键你想要撤回的那一条 >> Undo Commit

看到Undo Commit >> 我这个是已经push的了,如果你的commit了但是还没有push这里并不是灰色的。如果你想撤销就点击这个。

重新提交commit

ctrl + K >> 在changelist中选择刚才撤回的那个commit message项,就会出现刚才commit的所有文件 >> 此时选择你这次想要commit的文件即可。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值