diff options
Diffstat (limited to 'docs/newbs_git_using_your_master_branch.md')
-rw-r--r-- | docs/newbs_git_using_your_master_branch.md | 14 |
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 git remote add upstream https://github.com/qmk/qmk_firmware.git ``` -?> 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. +::: tip +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. +::: To verify that the repository has been added, run `git remote -v`, which should return the following: @@ -37,7 +39,7 @@ git push origin master This 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. -## Making Changes :id=making-changes +## Making Changes {#making-changes} To make changes, create a new branch by entering: @@ -48,7 +50,9 @@ git push --set-upstream origin dev_branch This 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. -?> With `git push`, you can use `-u` in place of `--set-upstream` — `-u` is an alias for `--set-upstream`. +::: tip +With `git push`, you can use `-u` in place of `--set-upstream` — `-u` is an alias for `--set-upstream`. +::: You 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. @@ -67,7 +71,9 @@ git commit -m "My commit message." `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. -?> If you've changed multiple files, you can use `git add -- path/to/file1 path/to/file2 ...` to add all your desired files. +::: tip +If you've changed multiple files, you can use `git add -- path/to/file1 path/to/file2 ...` to add all your desired files. +::: ## Publishing Your Changes |