.
This commit is contained in:
parent
374bbf5196
commit
89aab779e8
1 changed files with 20 additions and 2 deletions
22
.zshrc
22
.zshrc
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue