Skip to content

Instantly share code, notes, and snippets.

View Git Subtree

Git Subtree Basics

If you hate git submodule, then you may want to give git subtree a try.


When you want to use a subtree, you add the subtree to an existing repository where the subtree is a reference to another repository url and branch/tag. This add command adds all the code and files into the main repository locally; it's not just a reference to a remote repo.

When you stage and commit files for the main repo, it will add all of the remote files in the same operation. The subtree checkout will pull all the files in one pass, so there is no need to try and connect to another repo to get the portion of subtree files, because they were already included in the main repo.

Adding a subtree

Let's say you already have a git repository with at least one commit. You can add another repository into this respository like this:

sogaiu /
Last active Mar 15, 2022
manjaro audio setup for pulseaudio + jack2

Things that seemed to have helped assuming a default manjaro install (2022-03-08)

  • cadence
    • System tab -> JACK Bridges -> ALSA Audio -> Bridge Type: ALSA -> PulseAudio -> JACK (Plugin)
  • qjackctl
    • Setup -> Misc -> Enable JACK D-Bus Interface (might need to restart qjackctl)
    • Start Jack via qjackctl (Start button on main UI dialog)
    • Verify via Graph window (dialog activated via Graph button on main UI dialog) existence of:
      • PulseAudio Jack Sink (connected to system playback - 2 lines)
  • PulseAudio Jack Source (connected to system capture - 2 lines)
View gist:ccdc069e344ccea384906546ff95823e
sogaiu / Makefile.Android
Last active Feb 23, 2022
raylib and android notes
View Makefile.Android
# raylib makefile for Android project (APK building)
# Copyright (c) 2017-2022 Ramon Santamaria (@raysan5)
# This software is provided "as-is", without any express or implied warranty. In no event
# will the authors be held liable for any damages arising from the use of this software.
# Permission is granted to anyone to use this software for any purpose, including commercial
sogaiu / init.el
Last active Feb 21, 2022
janet-mode + janet-editor-elf + rainbow-delimiters + monokai via straight for emacs
View init.el
;; ~/.emacs.d/init.el
;; via:
(defvar bootstrap-version)
(let ((bootstrap-file
(expand-file-name "straight/repos/straight.el/bootstrap.el"
(bootstrap-version 5))
(unless (file-exists-p bootstrap-file)