git-learning/update_repos.sh

17 lines
264 B
Bash

#!/bin/bash
# Fetch latest changes from upstream
git fetch upstream
# Switch to main branch
git checkout main
# Merge upstream changes into main
git merge upstream/main
# Push changes to GitHub
git push origin main
# Push changes to Gitea
git push gitea main