diff options
| author | Jeremy Wood <36464809+JeremyWx@users.noreply.github.com> | 2019-10-28 11:44:42 -0400 |
|---|---|---|
| committer | Jeremy Wood <36464809+JeremyWx@users.noreply.github.com> | 2019-10-28 11:44:42 -0400 |
| commit | 2639fa60168267cc746b6249dd792b08c721674b (patch) | |
| tree | eb077564afcc3c9e823c6753bb87c2274c86a42b /contributors/guide/github-workflow.md | |
| parent | 8ee01f9f491343a7d8b9b9030ff0752e2b01b196 (diff) | |
| parent | ecea14c0af705635a47d6dbc99dc050ed2373065 (diff) | |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'contributors/guide/github-workflow.md')
| -rw-r--r-- | contributors/guide/github-workflow.md | 47 |
1 files changed, 22 insertions, 25 deletions
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" ---  @@ -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:<br> + - **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 |
