Ideally all work should be done on branches and only merged back when definately working. By convention no work should be done on the main branch - this should remain fully working at all times.
git branch mybranch
git checkout mybranch
git checkout main
git branch
Using the -a flag means that you will see all the branches, even the ones that are not on you local workspace.
git branch -a
git push origin mybranch
However we probably need to do this on Github as we are wanting to create pull requests and check the work first
git checkout main (first switch to the main branch)
git merge mybranch (merge all changes from mybranch into the main branch)
gid add <file> (fix and add any conflicts)
git commit -m 'merged changes'
git branch -d mybranch
git push origin :mybranch
git branch -d -r origin/name_of_origin_to_remove
-d
means delete a branch
-r
means remotes