This commit is contained in:
pika 2025-03-24 13:57:25 +01:00
parent 374bbf5196
commit 89aab779e8

22
.zshrc
View file

@ -363,10 +363,28 @@ __alias__() {
sleep 0.3
git commit -m " update: submodules"
git push &&
echo_info "push successfull"
echo "push successfull"
error_log
}
gwip() {
# Fetch the latest changes from the remote
git fetch
# Get the current branch name
local branch
branch=$(git rev-parse --abbrev-ref HEAD)
# Check if there are any changes on the remote branch
if git diff --quiet "$branch" "origin/$branch"; then
echo "No changes on the remote branch. Adding changes and pushing with 'wip' commit."
git add .
git commit -m "wip"
git push
else
echo "There are changes on the remote branch. Please pull the latest changes first."
fi
}
if command_exists lazygit; then
alias lg="lazygit"
fi