-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpush-to-github.sh
More file actions
executable file
·54 lines (46 loc) · 1.38 KB
/
push-to-github.sh
File metadata and controls
executable file
·54 lines (46 loc) · 1.38 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
#!/bin/bash
echo "🚀 GitHub Push Helper"
echo "===================="
echo ""
# Check if remote already exists
if git remote | grep -q "origin"; then
echo "✅ Git remote 'origin' already configured"
git remote -v
else
echo "📝 Please enter your GitHub username:"
read username
if [ -z "$username" ]; then
echo "❌ Username cannot be empty"
exit 1
fi
echo ""
echo "Adding remote: https://github.com/$username/rise-yahudim.git"
git remote add origin "https://github.com/$username/rise-yahudim.git"
echo "✅ Remote added!"
fi
echo ""
echo "📤 Pushing to GitHub..."
echo ""
echo "⚠️ You will be prompted for credentials:"
echo " Username: Your GitHub username"
echo " Password: Your Personal Access Token (NOT your password)"
echo ""
echo " Need a token? Go to:"
echo " https://github.com/settings/tokens"
echo ""
git push -u origin main
if [ $? -eq 0 ]; then
echo ""
echo "✅ Successfully pushed to GitHub!"
echo ""
echo "🎉 Next step: Deploy to Render.com"
echo " See API_DEPLOYMENT.md for instructions"
else
echo ""
echo "❌ Push failed. Common issues:"
echo " 1. Repository doesn't exist on GitHub yet"
echo " 2. Wrong credentials (use Personal Access Token)"
echo " 3. Network connection issues"
echo ""
echo " See GITHUB_SETUP.md for detailed help"
fi