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).
Asked
Active
Viewed 851 times
0
-
https://stackoverflow.com/search?q=%5Bgit%5D+make+the+current+branch+master – phd Jun 22 '21 at 20:25
1 Answers
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.

Tanzila Shaikh
- 11
- 2
-
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