Rewriting History, Git Rebasing
Unlike performin a git merge
instead of cramming all changes into a merge commit, a rebase preserves the original commits. The project’s history then looks as if it had evolved in a single, straight line. No indication remains that it had been split into multiple branches at some point.
Only rebase commit you haven’t yet shared to others.
In a the scope of a single branch
Pick the commit to which you need to perform changes.
git rebase -i --root 58977
replace pick
with squash
then save.
Solve conflicts commit and
git rebase --continue