Git and GitHub
Learn how to use Git and GitHub, so you can contribute to Braze Docs.
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.
Creating a branch
To create a new Git branch, first checkout the develop
branch and update your local environment.
1
2
git checkout develop
git pull
Create a new Git branch using Git’s checkout
command.
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), first checkout your branch.
1
git checkout BRANCH_NAME
Replace BRANCH_NAME
with the name of your branch you created previously. Your output should be similar to the following:
1
2
$ git checkout fixing-typo-in-metadata
Switched to branch 'fixing-typo-in-metadata'
Add your changes and stage your commit.
1
2
git add --all
git commit -m "COMMIT_MESSAGE"
Replace COMMIT_MESSAGE
with a short sentence describing your changes. 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(-)
Finally, push your changes to the Braze Docs GitHub repository.
1
git push -u origin BRANCH_NAME
Replace BRANCH_NAME
with the name of your branch. The output is similar to the following:
1
2
3
4
5
6
$ git push -u origin 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'.
Next, 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 Braze Docs repository page and select Pull requests.
Open the relevant pull request, 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, open the PR you previously created and select Ready for review.
Reviewers and type braze-inc/docs-team
. Select the team name and 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!