git 如何在 IntelliJ IDEA 中变基

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/36598046/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 11:56:28  来源:igfitidea点击:

How to rebase in IntelliJ IDEA

gitintellij-idea

提问by Jan Tajovsky

How can I do the following in the Intellij IDEA?

如何在 Intellij IDEA 中执行以下操作?

$ git checkout my-local-branch
$ git rebase master -i

采纳答案by vikingsteve

Easiest way: just open the git console in intellij and type it.

最简单的方法:只需在 intellij 中打开 git 控制台并输入即可。

Otherwise, the Git Integrationplugin in intellij, at least from version 8.1, has a Rebase ontofunction.

否则,Git Integrationintellij 中的插件,至少从 8.1 版开始,就有一个Rebase onto功能。

(accessible at the bottom right of your screen, where it says "Git: " - click, get up the "branches" popup, choose a branch).

(可在屏幕右下角访问,上面写着“Git:” - 单击,弹出“分支”弹出窗口,选择一个分支)。

Edit: there's also a dialog accessible via the intellij menu: VCS -> Git -> Rebase...

编辑:还有一个可通过 Intellij 菜单访问的对话框:VCS -> Git -> Rebase...

Documentation: Rebasing branches

文档:重新定位分支

回答by Ravinda lakshan

go to VCS -> Git _> rebase

转到 VCS -> Git _> 变基

and then fill the dialog with relavent details

然后用相关细节填充对话框

git Root : should be your local path <br/>
Branch   : your working branch(topic branch) </br>
Onto     : topic branch <br/>
From     : master branch

The interactive option can be used for normal rebase which will ignore merge commits.

交互式选项可用于将忽略合并提交的正常变基。

enter image description here

在此处输入图片说明

回答by Vampire

Menu VCS -> Git -> Rebase...

菜单 VCS -> Git -> Rebase...