You can combine multiple Git tasks into a single script to streamline your workflow. For example, you can create a script that pulls the latest changes, merges a branch, and pushes the changes:
#!/bin/bash
# Pull the latest changes with rebase
git fetch origin
git pull --rebase origin $(git branch --show-current)
# Merge a specified branch
if [ -n "$1" ]; then
git checkout "$1"
git pull origin "$1"
git checkout -
git merge "$1"
git push
echo "Merged branch '$1' into the current branch and pushed changes."
fi
echo "Workflow completed successfully!"