Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change the current branch to master in Egit?

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)

enter image description here

like image 520
Declan McKenna Avatar asked Feb 14 '12 14:02

Declan McKenna


1 Answers

It should be possible by:

  • creating a new branch on top of your current master (in order to not lose the HEAD of that branch)
  • resetting the master branch to the test branch (the commits won't be lost, since they are referenced by the new local branch you just created)

The OP Deco reports the appropriate process he followed:

  • Created a temp branch alongside the master branch
  • Right clicked and selected Team >'switch to' > 'master'
  • Chose hard reset and select the test branch.
like image 162
VonC Avatar answered Sep 19 '22 18:09

VonC