Repository navigation
Expand file tree
/
Copy pathPUSH_BRANCH.sh
More file actions
57 lines (48 loc) Β· 1.54 KB
/
Copy pathPUSH_BRANCH.sh
File metadata and controls
57 lines (48 loc) Β· 1.54 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/bash
# Push script for enhancement/rate-limit-429-headers branch
# This script pushes the branch to GitHub as Abolax123
set -e
REPO_PATH="/home/gamp/Desktop/wave/Talenttrust-Backend"
BRANCH="enhancement/rate-limit-429-headers"
echo "π Rate Limit 429 Headers - Push Script"
echo "======================================="
echo ""
echo "Repository: $REPO_PATH"
echo "Branch: $BRANCH"
echo ""
cd "$REPO_PATH"
# Verify we're on the correct branch
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
if [ "$CURRENT_BRANCH" != "$BRANCH" ]; then
echo "β Error: Not on branch $BRANCH (currently on $CURRENT_BRANCH)"
exit 1
fi
# Verify the commit exists
COMMIT=$(git rev-parse HEAD)
echo "β
Commit ready: $COMMIT"
echo ""
# Show what will be pushed
echo "π Changes to push:"
git log origin/main..HEAD --oneline
echo ""
# Verify remote
REMOTE=$(git remote get-url origin)
echo "π Remote: $REMOTE"
echo ""
# Instructions for pushing
echo "π To push this branch, follow these steps:"
echo ""
echo "1. If using HTTPS with GitHub credentials:"
echo " git push -u origin $BRANCH"
echo " (You may be prompted for GitHub credentials)"
echo ""
echo "2. If using SSH (requires SSH key added to GitHub):"
echo " git remote set-url origin git@github.com:Abolax123/Talenttrust-Backend.git"
echo " git push -u origin $BRANCH"
echo ""
echo "3. After push, create PR at:"
echo " https://github.com/Abolax123/Talenttrust-Backend/pull/new/$BRANCH"
echo ""
echo "4. Use the PR description from:"
echo " $REPO_PATH/PR_DESCRIPTION_RATE_LIMIT_429.md"
echo ""