-
Create a new branch from master:
-
git checkout master
orgit status
to 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. You can see the site build by clicking the Deployment "Details" link on the bottom of the PR page.
-
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
production
branch. -
git checkout production
-
git merge master
git checkout master
git branch my-new-branch
git checkout my-new-branch
git add filename
git commit -m "i edited a file"
git push origin my-new-branch
You can create tags in Git and push them to Github to make specific 'releases' for a delivery. This freezes the codebase at that point in time at a url using that tagname.
- Create a tag called batch1-templates
git tag batch1-templates
- Push to Github!
git push --tags
- Check the Github 'Releases' tab for your repo to see all tags.