0

I have a master branch. Then, I have an updated branch. How can I totally replace the content of master branch with the content of updated branch? I tried simple merge

git checkout master
git merge updated

The content of master branch wasn't updated.

Loren
  • 49
  • 6
  • 1
    Do you want to replace the history too? If not, do you want to make a merge commit or a single squash-style commit? – Ry- Jul 15 '22 at 07:51
  • 2
    See [Git Overwrite master with branch](https://stackoverflow.com/questions/30105210/git-overwrite-master-with-branch). You can also have a separate commit where you remove everything from the master branch and *then* merge your `updated` branch into it. – Peter Krebs Jul 15 '22 at 08:11

0 Answers0