Files
gotelegram_pro/push_to_github.bat
anten-ka 29b6e05866 GoTelegram MTProxy + bot (gotelegram_pro)
Made-with: Cursor
2026-03-06 14:59:00 +03:00

55 lines
1.4 KiB
Batchfile
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
@echo off
chcp 65001 >nul
setlocal
cd /d "%~dp0"
set REMOTE=git@github.com:anten-ka/gotelegram_pro.git
set BRANCH=main
echo [*] Репозиторий: https://github.com/anten-ka/gotelegram_pro
echo [*] Папка: %CD%
echo.
where git >nul 2>nul
if errorlevel 1 (
echo Ошибка: git не найден. Установите Git for Windows.
pause
exit /b 1
)
if not exist ".git" (
echo [*] Инициализация репозитория...
git init
)
git remote remove origin 2>nul
git remote add origin %REMOTE%
git branch -M %BRANCH%
git add .
git status
set /p CONFIRM="Закоммитить и отправить на GitHub? (y/n): "
if /i not "%CONFIRM%"=="y" (
echo Отменено.
pause
exit /b 0
)
git commit -m "GoTelegram MTProxy + bot (gotelegram_pro)" 2>nul || git commit --allow-empty -m "Update"
echo [*] Отправка на origin/%BRANCH%...
git push -u origin %BRANCH%
if errorlevel 1 (
echo.
echo Не удалось отправить. Проверьте:
echo 1. Репо создан на GitHub: https://github.com/anten-ka/gotelegram_pro
echo 2. Доступ по SSH: ssh -T git@github.com
echo 3. Или настройте токен: git remote set-url origin https://ВАШ_ТОКЕН@github.com/anten-ka/gotelegram_pro.git
pause
exit /b 1
)
echo.
echo Готово: https://github.com/anten-ka/gotelegram_pro
pause