0

I messed something up on the main branch that is causing many errors, the good news is I have a branch that has everything on the master branch + a feature that is 100% working. Being new to GIT I don't know the best way to go about this but how do I force that working branch to become the master branch? I've tried a pull request but it says that there is nothing to compare (even though there are some needed frameworks missing from the master).

Noah Iarrobino
  • 1,435
  • 1
  • 10
  • 31

1 Answers1

1

git branch -f master feature_branch : this will rewrite the local master branch with your feature branch

git push remote +feature_branch:master : this will rewrite remote branch.

  • Tried that but got these errors when running the second command: ```fatal: 'remote' does not appear to be a git repository fatal: Could not read from remote repository.``` – tHatpart Jun 22 '21 at 19:55
  • try with origin in place of remote. git push origin +feature_branch:master – Tanzila Shaikh Jun 24 '21 at 11:41