mirror of
https://github.com/prurigro/darkcloud-nvimconfig.git
synced 2024-12-22 16:00:24 -05:00
Reset submodules before updating them to prevent merge conflicts on local changes to updated files
This commit is contained in:
parent
087151b9de
commit
2092c6d01a
1 changed files with 2 additions and 1 deletions
3
update
3
update
|
@ -62,7 +62,7 @@ function show_help {
|
|||
}
|
||||
|
||||
### SETUP
|
||||
cd "$script_home"
|
||||
cd "$script_home" || exit
|
||||
|
||||
# delete old error log if it exists
|
||||
[[ -f "$error_log" ]] \
|
||||
|
@ -152,6 +152,7 @@ fi
|
|||
|
||||
# update each submodule to the new head and run 'git fetch --all'
|
||||
printf '%s' "$cbg_blue $c_reset$cbg_yellow + Fetching updates:$c_reset"
|
||||
git submodule foreach git reset --hard >/dev/null 2>&1
|
||||
process_status="$(git submodule foreach git fetch --all 2>&1)"
|
||||
if (( ! $? )); then
|
||||
process_status=$(git submodule update --init --recursive 2>&1)
|
||||
|
|
Loading…
Reference in a new issue