Maybe I'm confused, but I thought that if others have been working on their own branch and in the process of working on mine, a few PRs have been merged...so before I push to my remote and initiate a PR, I should git pull from the current master to my branch?
Kind of like this:
$ git add .
$ git commit -m "comments"
$ git pull origin master
$ git push origin myBranchName
Then open a PR.
You can so you will eventually get conflicts on your feature branch and solve them before pushing to remote.
that's in the steps now, edited ;-)
I see that in Step 5 you switch back to master to pull to your local copy of master, but how does that update your local branch without pulling master to your local branch?
I guess I still don't really understand why you would switch back to master and then back to branch. Thanks!
Valid question. Just doing git pull origin master in Step 5 will NOT update your local branch. This tutorial is missing a step between 6 and 7. Essentially after you git pull origin master in Step 5, and git checkout mybranchname in step 6, you will run git merge master to combine the master branch changes into your feature branch, named mybranchname. Hope that helps!
git pull origin master
git checkout mybranchname
git merge master
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.