Here is a list of git command that I think are useful and not necessarily known.
I will skip git init, git push, git commit, etc.
git branch -M main
to rename branch from master to main
git add .
git commit --amend --no-edit
git push -f
with --no-edit can skip the name update of the last commit. You can keep it to change it.:
git remote set-url origin <url>
replace <url> with the new project path