-
Create a new branch from master:
-
git checkout masterorgit statusto confirm you're working on master -
git branch my-new-branch -
Check out the new branch!!!
git checkout my-new-branch
-
Make commits on this branch
-
git add filename -
git commit -m "i edited a file" -
Push commits to remote repository (Github):
git push origin my-new-branch
This will create the branch on Github.
-
When you're ready for the branch to be reviewed, it's PULL REQUEST TIME. Go to the repository and click the BIG GREEN BUTTON
-
IF you can't merge through Github then you need to do it manually. Commands:
-
git checkout master -
Then make sure you're up to date with
git pull -
git merge my-new-branch -
git push origin master -
Once your Pull Request is approved and merged to master, you'll need to take an additional step to deploy it to the Client site by merging it to the
productionbranch. -
git checkout production -
git merge master