git-not-commonly-used-commands

format-patch

commits range, including old_commit & new_commit

1
git format-patch -a [old_commit] [new_commit] --stdout > test.patch
1
git format-patch -a [old_commit] [new_commit]
1
git format-patch -a --root --stdout [branch_name] > test.patch

more detail in man 7 gitrevisions

apply-mailbox

1
git am --whitespace=nowarn test.patch

remove submodule

1
2
3
4
git submodule deinit -f <path_to_submodule>
git rm <path_to_submodule>
git commit-m "Removed submodule"
rm -rf .git/modules/<path_to_submodule>