I have been introducing myself to git and am having trouble understanding how to assemble my workflow if I were to work with other individuals on a project.
Suppose a situation where I have been tasked with creating a new update to the existing code base. I would first pull from the remote repository, make a new branch, make my changes, commit, merge to my own master, and eventually push to the remote repository. But I want the changes I've made to be incorporated into the remote repo once my teammates have looked at the code and deemed it good. So in this situation ideally I would be able to make another branch but on the remote repository from the master version and push the changes that I made locally to that branch so that my teammates can look at it. Once they deem it ok, I want to be able to merge that branch on the remote repo into master version.
So in terms of commands on my end it would look like:
git pull
git checkout -b new_update_branch
//make changes to code, etc.
git add *
git commit -m "update finished"
git checkout master
git merge new_update_branch
//somehow push the changes to a new branch on the remote repository
//i.e. create a branch on the remote repository too
//teammates look at this branch on the remote repository and ok it
git push origin master
How would I go about the creating a branch on the remote repository so it doesn't affect master too?