How to replace master branch in git, entirely, from another branch?

Posted by Jason on Stack Overflow See other posts from Stack Overflow or by Jason
Published on 2010-05-19T03:06:29Z Indexed on 2010/05/19 3:10 UTC
Read the original article Hit count: 264

Filed under:
|
|

Hi,

I have two branch in my git repo:

  1. master
  2. seotweaks (created originally from master)

I created "seotweaks" with the intention of quickly merging it back into master, however that was 3 months ago and the code in this branch is 13 versions ahead of "master", it has effectively become our working master branch as all the code in "master" is more or less obsolete now.

Very bad practice I know, lesson learnt.

Do you know how I can replace all of the contents of the "master" branch with those in "seotweaks"?

I could just delete everything in "master" and merge, but this does not feel like best practice.

© Stack Overflow or respective owner

Related posts about git

Related posts about merge