DEV Community

Discussion on: Multiple Github PRs?

Collapse
thebouv profile image
Anthony Bouvier

It sounds like you may have created the hash branch, then created the array branch while still on the hash branch.

You should do this:

git checkout master
git pull
git checkout -b hash
make code changes for hash and commit them to hash branch
git checkout master
git checkout -b array
make code changes for array and commit them to array branch

Do you see what I mean?

You likely did this:

git checkout master
git pull
git checkout -b hash
make changes for hash
git checkout -b array (here is the mistake, this is branching OFF of hash branch, not master)
make changes for array

If you're using GitHub Flow which is all about feature branches being made off of master.

So, remember two things with this:

Always branch from master, and always make sure you have the most recent master (git pull it before branching off of it).