git 如何在Egit中将当前分支更改为master?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9278472/
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 06:28:52  来源:igfitidea点击:

How to change the current branch to master in Egit?

eclipsegitversion-controlegitmaster

提问by Declan McKenna

I want to know how to do this in Egit the eclipse plugin. This question has been asked many times for git but the answers involve some form of command language I do not have access to or know. Using the eclipse interface how can I make the test branch the master branch without taking on the original master branches flawed code (ie no merging)

我想知道如何在 Egit eclipse 插件中执行此操作。对于 git,这个问题已经被问过很多次,但答案涉及某种形式的命令语言,我无法访问或知道。使用eclipse接口如何使test分支成为master分支,而不需要承担原来的master分支有缺陷的代码(即不合并)

enter image description here

在此处输入图片说明

采纳答案by VonC

It should be possible by:

应该可以通过:

The OP Decoreports the appropriate process he followed:

OP德科报告的适当过程中,他遵循:

  • Created a tempbranch alongside the masterbranch
  • Right clicked and selected Team >'switch to' > 'master'
  • Chose hard resetand select the testbranch.
  • temp分支旁边创建了一个master分支
  • 右键单击并选择 Team >'switch to' > 'master'
  • 选择hard reset并选择test分支。