{"id":5095,"date":"2024-03-11T13:24:05","date_gmt":"2024-03-11T12:24:05","guid":{"rendered":"https:\/\/pmortensen.eu\/world2\/?p=5095"},"modified":"2026-06-15T17:24:39","modified_gmt":"2026-06-15T16:24:39","slug":"comprehensive-search-in-qmk-source-in-all-branches-incl-forks-and-forks-of-forks","status":"publish","type":"post","link":"https:\/\/pmortensen.eu\/world2\/2024\/03\/11\/comprehensive-search-in-qmk-source-in-all-branches-incl-forks-and-forks-of-forks\/","title":{"rendered":"Comprehensive search in QMK source in all branches, incl. forks and forks of forks"},"content":{"rendered":"<p>The divergence of <a href=\"https:\/\/docs.qmk.fm\/#\/faq_general?id=what-is-qmk\">QMK<\/a> software development can be confusing, but there is a systematic way to find which branch a particular feature or folder is in (instead of manually switch to each branch and manually look for the information).<\/p>\n<h2>Example: Q3 Pro source code<\/h2>\n<p>Find the Q3 Pro&#8217;s source is located, from scratch:<\/p>\n<pre class=\"brush: plain; gutter: false; title: ; notranslate\" title=\"\">\r\n# About 300 MB. 582426 'objects'.\r\ngit clone https:\/\/github.com\/Keychron\/qmk_firmware.git  _qmk_firmware_KeychronFork_temp\r\n\r\n# -i   : Case insensitive. Alternative: --regexp-ignore-case\r\n# -S   : 'Pickaxe'\r\n# --all: In all branches\r\n#\r\ncd $HOME\/_qmk_firmware_KeychronFork_temp\r\ngit log -i -S&quot;Q3 Pro&quot; --all  --  keyboards\r\n<\/pre>\n<p>A result is:<\/p>\n<pre class=\"brush: plain; gutter: false; title: ; notranslate\" title=\"\">\r\ncommit 4ae5990fcc0fabdbbb82e2e1c1375c861963c4d5\r\nAuthor: lokher &lt;lokher@gmail.com&gt;\r\nDate:   Wed Jan 10 16:22:49 2024 +0800\r\n\r\n    Added wireless support; Added Lemokey L3; Added Keychron V1 Max\r\n<\/pre>\n<p>Then:<\/p>\n<pre class=\"brush: plain; gutter: false; title: ; notranslate\" title=\"\">\r\ngit name-rev 4ae5990fcc0fabdbbb82e2e1c1375c861963c4d5\r\n<\/pre>\n<p>Result:<\/p>\n<pre class=\"brush: plain; gutter: false; title: ; notranslate\" title=\"\">\r\n4ae5990fcc0fabdbbb82e2e1c1375c861963c4d5 wireless_playground~11\r\n<\/pre>\n<p>Thus, in &#8220;wireless_playground&#8221;.<\/p>\n<p>Check it be going to the <a href=\"https:\/\/github.com\/Keychron\/qmk_firmware\">Keychron&#8217;s fork on the GitHub website<\/a>, select &#8220;wireless_playground&#8221; (in the dropdown, first select &#8220;View all branches&#8221; (as it isn&#8217;t immediately visible)), and navigate to <a href=\"https:\/\/github.com\/Keychron\/qmk_firmware\/tree\/wireless_playground\/keyboards\/keychron\">the keyboards\/Keychron folder<\/a>. The <a href=\"https:\/\/github.com\/Keychron\/qmk_firmware\/tree\/wireless_playground\/keyboards\/keychron\/q3_pro\">folder for Q3 Pro<\/a> is present. The last modification is listed as 2024-01-10 (matching our search result). In this particular case, all files for it were probably added all at once (either sort of the initial commit or it was copied from some other branch\/fork).<\/p>\n<p>Conclusion: It this case, we seem to have found it, though it <em>seems<\/em> the Git commit message was poor (not representative).<\/p>\n<p>Though this assumes the Git repository is already known, in this case <a href=\"https:\/\/github.com\/Keychron\/qmk_firmware\">Keychron&#8217;s fork of QMK<\/a>.<\/p>\n<p>Note that it searches in commit messages, so if those are not comprehensive or absent, nothing will be found. But it is also possible to search in the actual source code&mdash;see below.<\/p>\n<h3>Refinement<\/h3>\n<p>If the repository already exists, but is out of date (for example, source may have added in the meantime, e.g., source code for newer keyboard models in Keychron&#8217;s case):<\/p>\n<pre class=\"brush: plain; gutter: false; title: ; notranslate\" title=\"\">\r\ncd $HOME\/_qmk_firmware_KeychronFork_temp\r\ngit fetch # This will not make changes to the local \r\n          # repository, only download the information\r\ngit pull # The actual update\r\n\r\n# -i   : Case insensitive. Alternative: --regexp-ignore-case\r\n# -S   : 'Pickaxe'\r\n# --all: In all branches\r\n#\r\ncd $HOME\/_qmk_firmware_KeychronFork_temp\r\ngit log -i -S&quot;Q3 Pro&quot; --all  --  keyboards\r\n<\/pre>\n<p><!-- Example of find source code in an illogical place. --><\/p>\n<h2>All Keychron and Vial forks<\/h2>\n<h3>Keychron forks<\/h3>\n<ul>\n<li><a href=\"https:\/\/github.com\/Keychron\/qmk_firmware\">Keychon&#8217;s fork<\/a> of QMK<\/li>\n<li><a href=\"https:\/\/github.com\/KeychronMacro\/qmk_firmware\">KeychronMacro\/qmk_firmware<\/a>. A fork of a fork: A fork of Keychron&#8217;s fork, but it is <a href=\"https:\/\/www.reddit.com\/r\/Keychron\/comments\/18o67it\/comment\/kifln9l\/\">apparently official<\/a>. For example, it contains the source code for <a href=\"https:\/\/www.keychron.com\/products\/keychron-c3-pro-qmk-via-wired-mechanical-keyboard\">Keychron C3 Pro<\/a> (but illogically in Git branch <strong><em>&#8220;<a href=\"https:\/\/github.com\/KeychronMacro\/qmk_firmware\/tree\/keychron_k17_pro\">keychron_k17_pro<\/a>&#8220;<\/em><\/strong>) and <a href=\"https:\/\/github.com\/KeychronMacro\/qmk_firmware\/tree\/keychron_k17_pro\">C17 Pro<\/a>.<\/li>\n<\/ul>\n<h3>Vial forks<\/h3>\n<ul>\n<li><a href=\"https:\/\/github.com\/vial-kb\/vial-qmk\/tree\/vial\/keyboards\/keychron\/v3\">vial-qmk<\/a>, the official Vial repository. It is a fork of QMK and has diverged to an unknown degree.<\/li>\n<li><a href=\"https:\/\/github.com\/adophoxia\/vial-qmk\/tree\/vial\/keyboards\/omkbd\/ergodash\/rev1\/keymaps\/vial\">adophoxia&#8217;s fork<\/a>. It is often referred to. But it isn&#8217;t updated for all the newer Keychron keyboard models<\/li>\n<\/ul>\n<p><!-- \nInclude our Reddit posts as sources.\n--> <\/p>\n","protected":false},"excerpt":{"rendered":"<p>The divergence of QMK software development can be confusing, but there is a systematic way to find which branch a particular feature or folder is in (instead of manually switch to each branch and manually look for the information). Example: &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"more-link\" href=\"https:\/\/pmortensen.eu\/world2\/2024\/03\/11\/comprehensive-search-in-qmk-source-in-all-branches-incl-forks-and-forks-of-forks\/\"> <span class=\"screen-reader-text\">Comprehensive search in QMK source in all branches, incl. forks and forks of forks<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[4,43,28,35,46,16],"tags":[],"_links":{"self":[{"href":"https:\/\/pmortensen.eu\/world2\/wp-json\/wp\/v2\/posts\/5095"}],"collection":[{"href":"https:\/\/pmortensen.eu\/world2\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pmortensen.eu\/world2\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pmortensen.eu\/world2\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pmortensen.eu\/world2\/wp-json\/wp\/v2\/comments?post=5095"}],"version-history":[{"count":21,"href":"https:\/\/pmortensen.eu\/world2\/wp-json\/wp\/v2\/posts\/5095\/revisions"}],"predecessor-version":[{"id":5164,"href":"https:\/\/pmortensen.eu\/world2\/wp-json\/wp\/v2\/posts\/5095\/revisions\/5164"}],"wp:attachment":[{"href":"https:\/\/pmortensen.eu\/world2\/wp-json\/wp\/v2\/media?parent=5095"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pmortensen.eu\/world2\/wp-json\/wp\/v2\/categories?post=5095"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pmortensen.eu\/world2\/wp-json\/wp\/v2\/tags?post=5095"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}