aboutsummaryrefslogtreecommitdiff
path: root/docs/newbs_git_resynchronize_a_branch.md
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2021-09-14 22:16:24 +1000
committerGitHub <noreply@github.com>2021-09-14 13:16:24 +0100
commitb56282756b5faa410301de8c4ecdcae0e0148652 (patch)
treecf68cfe0e4f148d6eab52ae289ce261bea88f6c3 /docs/newbs_git_resynchronize_a_branch.md
parent0ca4a56a0449d17a497ba610d4cee41c914ff50e (diff)
downloadqmk_firmware-b56282756b5faa410301de8c4ecdcae0e0148652.tar.gz
qmk_firmware-b56282756b5faa410301de8c4ecdcae0e0148652.zip
[Docs] Clean up some code block languages (#14434)
Diffstat (limited to 'docs/newbs_git_resynchronize_a_branch.md')
-rw-r--r--docs/newbs_git_resynchronize_a_branch.md16
1 files changed, 8 insertions, 8 deletions
diff --git a/docs/newbs_git_resynchronize_a_branch.md b/docs/newbs_git_resynchronize_a_branch.md
index 3e7acdba7..1d0e4dda1 100644
--- a/docs/newbs_git_resynchronize_a_branch.md
+++ b/docs/newbs_git_resynchronize_a_branch.md
@@ -8,7 +8,7 @@ Suppose you have committed to your `master` branch, and now need to update your
8 8
9No 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: 9No 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:
10 10
11```sh 11```
12git branch old_master master 12git branch old_master master
13``` 13```
14 14
@@ -18,7 +18,7 @@ Now you have a branch named `old_master` that is a duplicate of your `master` br
18 18
19Now it's time to resynchronize your `master` branch. For this step, you'll want to have QMK's repository configured as a remote in Git. To check your configured remotes, run `git remote -v`, which should return something similar to: 19Now it's time to resynchronize your `master` branch. For this step, you'll want to have QMK's repository configured as a remote in Git. To check your configured remotes, run `git remote -v`, which should return something similar to:
20 20
21```sh 21```
22QMKuser ~/qmk_firmware (master) 22QMKuser ~/qmk_firmware (master)
23$ git remote -v 23$ git remote -v
24origin https://github.com/<your_username>/qmk_firmware.git (fetch) 24origin https://github.com/<your_username>/qmk_firmware.git (fetch)
@@ -29,7 +29,7 @@ upstream https://github.com/qmk/qmk_firmware.git (push)
29 29
30If you only see one fork referenced: 30If you only see one fork referenced:
31 31
32```sh 32```
33QMKuser ~/qmk_firmware (master) 33QMKuser ~/qmk_firmware (master)
34$ git remote -v 34$ git remote -v
35origin https://github.com/qmk/qmk_firmware.git (fetch) 35origin https://github.com/qmk/qmk_firmware.git (fetch)
@@ -38,31 +38,31 @@ origin https://github.com/qmk/qmk_firmware.git (push)
38 38
39add a new remote with: 39add a new remote with:
40 40
41```sh 41```
42git remote add upstream https://github.com/qmk/qmk_firmware.git 42git remote add upstream https://github.com/qmk/qmk_firmware.git
43``` 43```
44 44
45Then, redirect the `origin` remote to your own fork with: 45Then, redirect the `origin` remote to your own fork with:
46 46
47```sh 47```
48git remote set-url origin https://github.com/<your_username>/qmk_firmware.git 48git remote set-url origin https://github.com/<your_username>/qmk_firmware.git
49``` 49```
50 50
51Now that you have both remotes configured, you need to update the references for the upstream repository, which is QMK's, by running: 51Now that you have both remotes configured, you need to update the references for the upstream repository, which is QMK's, by running:
52 52
53```sh 53```
54git fetch upstream 54git fetch upstream
55``` 55```
56 56
57At this point, resynchronize your branch to QMK's by running: 57At this point, resynchronize your branch to QMK's by running:
58 58
59```sh 59```
60git reset --hard upstream/master 60git reset --hard upstream/master
61``` 61```
62 62
63These steps will update the repository on your computer, but your GitHub fork will still be out of sync. To resynchronize your fork on GitHub, you need to push to your fork, instructing Git to override any remote changes that are not reflected in your local repository. To do this, run: 63These steps will update the repository on your computer, but your GitHub fork will still be out of sync. To resynchronize your fork on GitHub, you need to push to your fork, instructing Git to override any remote changes that are not reflected in your local repository. To do this, run:
64 64
65```sh 65```
66git push --force-with-lease 66git push --force-with-lease
67``` 67```
68 68