.
This commit is contained in:
parent
89aab779e8
commit
4961cf01b0
1 changed files with 35 additions and 10 deletions
45
.zshrc
45
.zshrc
|
@ -354,17 +354,42 @@ __alias__() {
|
||||||
alias gcm="git commit -m"
|
alias gcm="git commit -m"
|
||||||
alias gpu="git push --recurse-submodule=on-demand"
|
alias gpu="git push --recurse-submodule=on-demand"
|
||||||
gsu() {
|
gsu() {
|
||||||
echo "-- pulling submodules --"
|
echo_info "Pulling submodules..."
|
||||||
git submodule foreach git pull --recurse-submodule
|
if git submodule foreach git pull --recurse-submodule; then
|
||||||
echo "-- updating submodules --"
|
echo_info "Submodules pulled successfully."
|
||||||
git submodule update --init --recursive
|
else
|
||||||
git diff . &&
|
echo_error "Failed to pull submodules."
|
||||||
git add .
|
return 1
|
||||||
sleep 0.3
|
fi
|
||||||
git commit -m " update: submodules"
|
|
||||||
git push &&
|
|
||||||
echo "push successfull"
|
|
||||||
|
|
||||||
|
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() {
|
gwip() {
|
||||||
# Fetch the latest changes from the remote
|
# Fetch the latest changes from the remote
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue