Git and GitHub
Learn how to use Git and GitHub, so you can contribute to Braze Docs. Approved contributions will be deployed on the following Tuesday or Thursday. Be sure to check out Braze Docs so you can celebrate your hard work. Thanks for contributing!
If you’re new to Git or the command-line, start with our tutorial instead: Your first contribution.
Prerequisites
If you haven’t already, complete the steps for Contributing to Braze Docs.
Getting the latest changes
To update your local environment with the latest changes from the Braze Docs repository , pull the develop
branch.
1
2
git checkout develop
git pull
Creating a branch
To create a new branch, use Git’s checkout
command with the -b
flag.
1
git checkout -b BRANCH_NAME
Replace BRANCH_NAME
with a short, non-space-separated description of your branch’s changes. Your output should be similar to the following:
1
2
$ git checkout -b fixing-typo-in-metadata
Switched to a new branch 'fixing-typo-in-metadata'
Creating a pull request
To create a pull request (PR) for the branch you created previously, add your changes and stage a commit. Replace COMMIT_MESSAGE
with a short sentence describing your changes.
1
2
git add --all
git commit -m "COMMIT_MESSAGE"
Your output should be similar to the following:
1
2
3
$ git commit -m "Fixing a typo in the recommended software doc
[fixing-typo-in-recommended-software 8b05e34] Fixing a typo in the metadata doc.
1 file changed, 1 insertion(+), 1 deletion(-)
Push your changes to the Braze Docs GitHub repository. Replace BRANCH_NAME
with the name of your branch.
If you previously forked the Braze Docs repository, use upstream
as your remote. External contributors typically fork the repository.
1
git push -u upstream BRANCH_NAME
If you previously cloned the Braze Docs repository, use origin
as your remote. Internal contributors typically clone the repository.
1
git push -u origin BRANCH_NAME
The output is similar to the following:
1
2
3
4
5
6
$ git push -u upstream fixing-typo-in-recommended-software
Enumerating objects: 14, done.
...
To github.com:braze-inc/braze-docs.git
* [new branch] fixing-typo-in-recommended-software -> fixing-typo-in-recommended-software
branch 'fixing-typo-in-recommended-software' set up to track 'origin/fixing-typo-in-recommended-software'.
Go to the Braze Docs GitHub repository , then select Compare & pull request.
In the PR description, you’ll see Markdown comments similar to the following. Use these comments to help fill out your PR.
1
<!-- This is a Markdown comment. -->
When you’re finished, select the pull request dropdown, then select Draft pull request.
Allowing changes to pull requests
In GitHub, go to the PR you previously created, then check Allow edits and access to secrets from maintainers. This will let the Braze Docs team make style or formatting changes to your content.
Requesting a review
To request a PR review from a member of the Braze Docs team, go to the PR you previously created and select Ready for review.
Select Reviewers, then type braze-inc/docs-team
and select the team name. Press Esc or click out of the dropdown to confirm your selection.
If the Braze Docs team requests additional changes after their review, you’ll be notified per your GitHub notification settings . If no changes are required, the team will approve and merge your changes.
Approved contributions will be deployed on the following Tuesday or Thursday. Be sure to check out Braze Docs so you can celebrate your hard work. Thanks for contributing!