-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsync-repos.sh
More file actions
36 lines (28 loc) · 764 Bytes
/
Copy pathsync-repos.sh
File metadata and controls
36 lines (28 loc) · 764 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
# sync-repos.sh
# V0.1 vom 2025-10-21
set -e # Script bei Fehlern abbrechen
echo "Fetching from all remotes..."
git fetch --all
echo "Current status:"
git status
echo "Merging forgejo/main..."
if ! git merge forgejo/master; then
echo "❌ Merge conflict with forgejo! Please resolve manually."
exit 1
fi
echo "Merging github/main..."
if ! git merge github/master; then
echo "❌ Merge conflict with github! Please resolve manually."
exit 1
fi
echo "Merging codeberg/main..."
if ! git merge codeberg/master; then
echo "❌ Merge conflict with codeberg! Please resolve manually."
exit 1
fi
echo "Pushing to all remotes..."
git push forgejo master
git push github master
git push codeberg master
echo "✅ Sync complete!"