-1

How can I delete or reset my remote and local Git master branch and copy/use the code of another branch to master ?

I want to preserve this another "better_branch" and make an exact copy from it to master ! The old commits on the actual master branch are not that important!

LazyOne
  • 148,457
  • 42
  • 363
  • 369
Bizboss
  • 7,522
  • 27
  • 102
  • 169

1 Answers1

1

From the master branch, you can simply run

$ git reset --hard better_branch

Then git push -f to "force push" your local master overtop of the remote master.

user229044
  • 222,134
  • 40
  • 319
  • 330