Ignoring submodule commits
This commit is contained in:
parent
a23ca9b9bf
commit
8c786deafb
2 changed files with 5 additions and 11 deletions
4
.gitmodules
vendored
4
.gitmodules
vendored
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue