-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpush-to-github.bat
More file actions
60 lines (50 loc) · 1.48 KB
/
push-to-github.bat
File metadata and controls
60 lines (50 loc) · 1.48 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
58
59
60
@echo off
echo ===== YouTube Smart Chapters AI GitHub Push =====
echo This script will push your project to your existing GitHub repository.
echo Repository: https://github.com/yaskovbs/YouTube_Smart_Chapters_AI.git
echo.
REM Initialize git repository if not already done
if not exist .git (
echo Initializing git repository...
git init
echo Git repository initialized successfully.
) else (
echo Git repository already initialized.
)
REM Add all files to git
echo Adding files to git...
git add .
REM Commit changes
echo Committing files...
git commit -m "Update YouTube Smart Chapters AI"
REM Set up the remote repository
echo Setting up GitHub remote repository...
git remote remove origin 2>nul
git remote add origin https://github.com/yaskovbs/YouTube_Smart_Chapters_AI.git
echo.
echo ===== Ready to Push Code =====
echo.
REM Push to GitHub
echo Pushing to GitHub...
echo This might require you to authenticate with GitHub.
echo.
echo Attempting to push to 'main' branch...
git push -u origin main
if %ERRORLEVEL% NEQ 0 (
echo.
echo Failed to push to 'main' branch. Trying 'master' branch...
git push -u origin master
)
if %ERRORLEVEL% NEQ 0 (
echo.
echo Could not push to GitHub. You might need to:
echo - Use a personal access token instead of your password
echo - Set up SSH key authentication
echo See: https://docs.github.com/en/authentication
) else (
echo.
echo Successfully pushed to GitHub!
)
echo.
echo Press any key to exit...
pause >nul