-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
  • 158,824
  • 45
  • 388
  • 391
Bizboss
  • 7,792
  • 27
  • 109
  • 174

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
  • 232,980
  • 40
  • 330
  • 338