masterbranch updated, but never commit to it. Instead, do all your changes in a development branch and issue pull requests from your branches when you're developing.
masterbranch relatively up-to-date, and start any new developments by creating a new branch.
masterbranch updated, it is recommended to add the QMK Firmware repository ("repo") as a remote repository in git. To do this, open your Git command line interface and enter:
upstreamis arbitrary, but a common convention; you can give the QMK remote any name that suits you. Git's
remotecommand 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
push, to specify the remote repo on which to act.
git remote -v, which should return the following:
git fetch upstream. This retrieves the branches and tags — collectively referred to as "refs" — from the QMK repo, which now has the nickname
upstream. We can now compare the data on our fork
originto that held by QMK.
masterbranch, retrieves the refs from the QMK repo, downloads the current QMK
masterbranch to your computer, and then uploads it to your fork.
dev_branch, checks it out, and then saves the new branch to your fork. The
--set-upstreamargument tells git to use your fork and the
dev_branchbranch every time you use
git pullfrom this branch. It only needs to be used on the first push; after that, you can safely use
git pull, without the rest of the arguments.
git push, you can use
-uin place of
-uis an alias for
git checkout -bwill base your new branch on the branch that is currently checked out. You can base your new branch on an existing branch that is not checked out by adding the name of the existing branch to the command:
git addadds 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.
git add -- path/to/file1 path/to/file2 ...to add all your desired files.
git push. Git will then publish the current state of
dev_branchto your fork.