From 45610413234fd24e56c76a4cc63b3cb5c1178852 Mon Sep 17 00:00:00 2001 From: James Young Date: Sat, 23 Nov 2019 12:15:43 -0800 Subject: [PATCH] rework the resynchronization instructions per mtei --- docs/newbs_git_resynchronize_a_branch.md | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/docs/newbs_git_resynchronize_a_branch.md b/docs/newbs_git_resynchronize_a_branch.md index d2331235ef26..acf5e3b1c2c3 100644 --- a/docs/newbs_git_resynchronize_a_branch.md +++ b/docs/newbs_git_resynchronize_a_branch.md @@ -6,31 +6,17 @@ Suppose you have committed to your `master` branch, and now need to update your ## Backing Up the Changes on Your Own Master Branch (Optional) -No one wants to lose work if it can be helped. If you want to save the changes you've already made to your `master` branch, the simplest way to do so is to simply rename your branch: +No one wants to lose work if it can be helped. If you want to save the changes you've already made to your `master` branch, the simplest way to do so is to simply create a duplicate of your "dirty" `master` branch: ```sh -$ git branch -m old_master # Renames the current branch +$ git branch old_master master ``` -Now you have a branch named `old_master`, but no `master` branch. To create a new `master` branch, enter: - -```sh -$ git branch master # Creates a new branch -``` - -When you create a branch, the new branch matches the state of the current branch. - -Now it's time to resynchronize your `master` branch. First, it needs to be checked out: - -```sh -$ git checkout master -``` - -?> You can use `git checkout -b master` to create a new branch named `master`, in place of running `git branch master` followed by `git checkout master`. +Now you have a branch named `old_master` that is a duplicate of your `master` branch. ## Resynchronizing Your Branch -For this step, you'll want to have the upstream repository configured as a remote in Git. To check your configured remotes, run `git remote -v`, which should return something similar to: +Now it's time to resynchronize your `master` branch. For this step, you'll want to have the upstream repository configured as a remote in Git. To check your configured remotes, run `git remote -v`, which should return something similar to: ```sh QMKuser ~/qmk_firmware (master)