From 463f51476fdc1147a90a97179ea9fd1d912ddf65 Mon Sep 17 00:00:00 2001 From: Bob Killen Date: Tue, 8 Oct 2019 19:40:09 -0400 Subject: Update contributor guide formatting to be Hugo compatible. --- contributors/guide/github-workflow.md | 47 ++++++++++++++++------------------- 1 file changed, 22 insertions(+), 25 deletions(-) (limited to 'contributors/guide/github-workflow.md') diff --git a/contributors/guide/github-workflow.md b/contributors/guide/github-workflow.md index 8174aaf8..1963b206 100644 --- a/contributors/guide/github-workflow.md +++ b/contributors/guide/github-workflow.md @@ -1,7 +1,7 @@ --- title: "GitHub Workflow" weight: 1 -slug: "github" +slug: "github-workflow" --- ![Git workflow](git_workflow.png) @@ -173,38 +173,35 @@ _If you have upstream write access_, please refrain from using the `Revert` button in the GitHub UI for creating the PR, because GitHub will create the PR branch inside the main repository rather than inside your fork. -1. Create a branch and sync it with upstream. +- Create a branch and sync it with upstream. -```sh -# create a branch -git checkout -b myrevert - -# sync the branch with upstream -git fetch upstream -git rebase upstream/master -``` + ```sh + # create a branch + git checkout -b myrevert -2. If the commit you wish to revert is a: + # sync the branch with upstream + git fetch upstream + git rebase upstream/master + ``` +- If the commit you wish to revert is a:
+ - **merge commit:** -- merge commit: + ```sh + # SHA is the hash of the merge commit you wish to revert + git revert -m 1 SHA + ``` -```sh -# SHA is the hash of the merge commit you wish to revert -git revert -m 1 SHA -``` - -- single commit: + - **single commit:** -```sh -# SHA is the hash of the single commit you wish to revert -git revert SHA -``` + ```sh + # SHA is the hash of the single commit you wish to revert + git revert SHA + ``` -3. This will create a new commit reverting the changes. -Push this new commit to your remote. +- This will create a new commit reverting the changes. Push this new commit to your remote. ```sh git push ${your_remote_name} myrevert ``` -4. [Create a Pull Request](#7-create-a-pull-request) using this branch. +- [Create a Pull Request](#7-create-a-pull-request) using this branch. \ No newline at end of file -- cgit v1.2.3