How to begin with your code like from scratch in git context

rm -rf .git
git init
git commit -m "Initial commit"
git branch -M main
git remote add origin <NEW_GIT_REMOTE_REPO_URL>
git push -u origin main --force