summaryrefslogtreecommitdiff
path: root/docs/newbs_git_using_your_master_branch.md
diff options
context:
space:
mode:
authorNick Brassel <nick@tzarc.org>2024-05-30 12:00:41 +1000
committerGitHub <noreply@github.com>2024-05-30 12:00:41 +1000
commit6ef97172889ccd5db376b2a9f8825489e24fdac4 (patch)
tree334e3bf41c8554d4bee73a140822f95f60eb64e9 /docs/newbs_git_using_your_master_branch.md
parent395766657ff98a4b1fd0dcba5917557f8acbb9e4 (diff)
Vitepress conversion of docs. (#23795)
Diffstat (limited to 'docs/newbs_git_using_your_master_branch.md')
-rw-r--r--docs/newbs_git_using_your_master_branch.md14
1 files changed, 10 insertions, 4 deletions
diff --git a/docs/newbs_git_using_your_master_branch.md b/docs/newbs_git_using_your_master_branch.md
index c27323f551..da9aeed03c 100644
--- a/docs/newbs_git_using_your_master_branch.md
+++ b/docs/newbs_git_using_your_master_branch.md
@@ -12,7 +12,9 @@ To keep your `master` branch updated, it is recommended to add the QMK Firmware
12git remote add upstream https://github.com/qmk/qmk_firmware.git 12git remote add upstream https://github.com/qmk/qmk_firmware.git
13``` 13```
14 14
15?> The name `upstream` is arbitrary, but a common convention; you can give the QMK remote any name that suits you. Git's `remote` command uses the syntax `git remote add <name> <url>`, `<name>` being shorthand for the remote repo. This name can be used with many Git commands, including but not limited to `fetch`, `pull` and `push`, to specify the remote repo on which to act. 15::: tip
16The name `upstream` is arbitrary, but a common convention; you can give the QMK remote any name that suits you. Git's `remote` command uses the syntax `git remote add <name> <url>`, `<name>` being shorthand for the remote repo. This name can be used with many Git commands, including but not limited to `fetch`, `pull` and `push`, to specify the remote repo on which to act.
17:::
16 18
17To verify that the repository has been added, run `git remote -v`, which should return the following: 19To verify that the repository has been added, run `git remote -v`, which should return the following:
18 20
@@ -37,7 +39,7 @@ git push origin master
37 39
38This switches you to your `master` branch, retrieves the refs from the QMK repo, downloads the current QMK `master` branch to your computer, and then uploads it to your fork. 40This switches you to your `master` branch, retrieves the refs from the QMK repo, downloads the current QMK `master` branch to your computer, and then uploads it to your fork.
39 41
40## Making Changes :id=making-changes 42## Making Changes {#making-changes}
41 43
42To make changes, create a new branch by entering: 44To make changes, create a new branch by entering:
43 45
@@ -48,7 +50,9 @@ git push --set-upstream origin dev_branch
48 50
49This creates a new branch named `dev_branch`, checks it out, and then saves the new branch to your fork. The `--set-upstream` argument tells git to use your fork and the `dev_branch` branch every time you use `git push` or `git pull` from this branch. It only needs to be used on the first push; after that, you can safely use `git push` or `git pull`, without the rest of the arguments. 51This creates a new branch named `dev_branch`, checks it out, and then saves the new branch to your fork. The `--set-upstream` argument tells git to use your fork and the `dev_branch` branch every time you use `git push` or `git pull` from this branch. It only needs to be used on the first push; after that, you can safely use `git push` or `git pull`, without the rest of the arguments.
50 52
51?> With `git push`, you can use `-u` in place of `--set-upstream` &mdash; `-u` is an alias for `--set-upstream`. 53::: tip
54With `git push`, you can use `-u` in place of `--set-upstream` &mdash; `-u` is an alias for `--set-upstream`.
55:::
52 56
53You can name your branch nearly anything you want, though it is recommended to name it something related to the changes you are going to make. 57You can name your branch nearly anything you want, though it is recommended to name it something related to the changes you are going to make.
54 58
@@ -67,7 +71,9 @@ git commit -m "My commit message."
67 71
68`git add` adds files that have been changed to Git's *staging area*, which is Git's "loading zone." This contains the changes that are going to be *committed* by `git commit`, which saves the changes to the repo. Use descriptive commit messages so you can know what was changed at a glance. 72`git add` adds files that have been changed to Git's *staging area*, which is Git's "loading zone." This contains the changes that are going to be *committed* by `git commit`, which saves the changes to the repo. Use descriptive commit messages so you can know what was changed at a glance.
69 73
70?> If you've changed multiple files, you can use `git add -- path/to/file1 path/to/file2 ...` to add all your desired files. 74::: tip
75If you've changed multiple files, you can use `git add -- path/to/file1 path/to/file2 ...` to add all your desired files.
76:::
71 77
72## Publishing Your Changes 78## Publishing Your Changes
73 79