-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgit-manager.bat
More file actions
121 lines (105 loc) · 1.66 KB
/
Copy pathgit-manager.bat
File metadata and controls
121 lines (105 loc) · 1.66 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
@echo off
title TechScript Git Manager
color 0A
:MENU
cls
echo ==========================================
echo TechScript 2.0 Git Manager
echo ==========================================
echo.
echo [1] Commit and Push
echo [2] Git Status
echo [3] View Branches
echo [4] Switch Branch
echo [5] Pull Latest
echo [6] Fetch
echo [7] Create New Branch
echo [8] Merge Branch into Main
echo [9] View Commit History
echo [10] Open GitHub Repo
echo [0] Exit
echo.
set /p choice=Select Option:
if "%choice%"=="1" goto PUSH
if "%choice%"=="2" goto STATUS
if "%choice%"=="3" goto BRANCHES
if "%choice%"=="4" goto SWITCH
if "%choice%"=="5" goto PULL
if "%choice%"=="6" goto FETCH
if "%choice%"=="7" goto CREATE
if "%choice%"=="8" goto MERGE
if "%choice%"=="9" goto LOG
if "%choice%"=="10" goto OPEN
if "%choice%"=="0" exit
goto MENU
:PUSH
cls
echo.
set /p msg=Commit Message (Leave empty for automatic):
if "%msg%"=="" (
set msg=Auto Commit %date% %time%
)
git add .
git commit -m "%msg%"
git push origin main
echo.
pause
goto MENU
:STATUS
cls
git status
echo.
pause
goto MENU
:BRANCHES
cls
git branch -a
echo.
pause
goto MENU
:SWITCH
cls
git branch -a
echo.
set /p br=Enter branch name:
git checkout %br%
pause
goto MENU
:PULL
cls
git pull origin main
pause
goto MENU
:FETCH
cls
git fetch --all
pause
goto MENU
:CREATE
cls
set /p nb=New branch name:
git checkout -b %nb%
git push -u origin %nb%
pause
goto MENU
:MERGE
cls
git checkout main
git pull
echo.
git branch
echo.
set /p mb=Merge branch:
git merge %mb%
git push origin main
pause
goto MENU
:LOG
cls
git log --oneline --graph --decorate --all
pause
goto MENU
:OPEN
cls
start https://github.com/Tcode-Motion/TechScript-2.0
goto MENU