This commit is contained in:
pika 2025-03-24 13:58:25 +01:00
parent 89aab779e8
commit 4961cf01b0

45
.zshrc
View file

@ -354,17 +354,42 @@ __alias__() {
alias gcm="git commit -m"
alias gpu="git push --recurse-submodule=on-demand"
gsu() {
echo "-- pulling submodules --"
git submodule foreach git pull --recurse-submodule
echo "-- updating submodules --"
git submodule update --init --recursive
git diff . &&
git add .
sleep 0.3
git commit -m " update: submodules"
git push &&
echo "push successfull"
echo_info "Pulling submodules..."
if git submodule foreach git pull --recurse-submodule; then
echo_info "Submodules pulled successfully."
else
echo_error "Failed to pull submodules."
return 1
fi
echo_info "Updating submodules..."
if git submodule update --init --recursive; then
echo_info "Submodules updated successfully."
else
echo_error "Failed to update submodules."
return 1
fi
if git diff .; then
echo_info "Staging changes..."
git add .
sleep 0.3
if git commit -m " update: submodules"; then
echo_info "Changes committed successfully."
else
echo_error "Failed to commit changes."
return 1
fi
else
echo_info "No changes to commit."
fi
if git push; then
echo_info "Push successful."
else
echo_error "Failed to push changes."
return 1
fi
}
gwip() {
# Fetch the latest changes from the remote