Forking after working on a branch

I cloned someone else’s project, made a branch, and made some commits to it.

When I tried to push it, I found out I should have forked instead of making a branch.

I pushed the fork button now, but after that, what should I do to keep the commit messages when pushing to the fork?

git remote -v
git remote set-url origin [new-url]

and then pushing seems to have worked.