As you have already moved towards origin, your changes have been published for others to see and be distracted. Because of this, you probably do not want to rewrite the story. Therefore, it is best to use git revert .
This creates a new commit that rolls back the changes you made. Press the new commit and the origin will be fixed.
Here is an SO answer that provides more details on this.
source share