Ignoring submodule commits

This commit is contained in:
agryphus 2023-10-16 00:34:24 -04:00
parent a23ca9b9bf
commit 8c786deafb
2 changed files with 5 additions and 11 deletions

4
.gitmodules vendored
View file

@ -1,9 +1,13 @@
[submodule ".config/st"] [submodule ".config/st"]
path = .config/st path = .config/st
url = ../st.git url = ../st.git
ignore = all
[submodule ".config/dwm"] [submodule ".config/dwm"]
path = .config/dwm path = .config/dwm
url = ../dwm.git url = ../dwm.git
ignore = all
[submodule ".config/nvim"] [submodule ".config/nvim"]
path = .config/nvim path = .config/nvim
url = ../nvim.git url = ../nvim.git
ignore = all

View file

@ -28,17 +28,7 @@ chmod 700 "$HOME/.local/share/gnupg/"
config submodule init config submodule init
config submodule update --force --recursive --init --remote config submodule update --force --recursive --init --remote
config submodule foreach "git checkout master"
# Git submodules will, by default, have the branch name be a hash
# of the current commit. This bit just goes into each submodule
# and explicitly checks out master.
cd $HOME
submodules="$(grep submodule .gitmodules | awk -F'"' '{print $2}')"
IFS=$'\n'
for mod_path in $submodules; do
cd "$HOME/$mod_path"
git checkout master
done
exec zsh exec zsh