This question is similar to this question but I need to understand how the complications of having pushed the new feature to remote.
Essentially I have a branch, new_feature_2, which I by mistake started developing off of new_feature_1. I meant to develop new_feature_2 off of main and now I am trying to rectify my mistake.
From the above link it seems like I should rebase new_feature_2 onto main in the following fashion.
git checkout new_feature_2
git rebase --onto main new_feature_1 new_feature_2
Now, I would like to extend the question by understanding what I need to do to the remote branch? I had already pushed my new_feature_2 branch to the remote. Is there anything special I need to do here? Or after I complete the rebase, can I just push again?