Skip to content

Instantly share code, notes, and snippets.

View brghena's full-sized avatar

Branden Ghena brghena

View GitHub Profile
@brghena
brghena / .bashrc
Last active September 15, 2024 14:44
Sensible git submodules
# make git submodules usable
# This overwrites the 'git' command with modifications where necessary, and
# calls the original otherwise
git() {
if [[ $@ == clone* ]]; then
gitargs=$(echo "$@" | cut -c6-)
command git clone --recursive $gitargs
elif [[ $@ == pull* ]]; then
command git "$@" && git submodule update --init --recursive
elif [[ $@ == checkout* ]]; then