-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpush.bat
More file actions
62 lines (43 loc) · 823 Bytes
/
push.bat
File metadata and controls
62 lines (43 loc) · 823 Bytes
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
@echo OFF
@rem --------------------------------------------------------------
@rem
@rem --------------------------------------------------------------
setlocal
@rem store the drive and path of this file in a variable
set dirname=%~dp0
@rem cd to the directory containing this file
pushd %dirname%
@rem do stuff
:folder
if "%1%" == "" goto askfolder
set fldr=%1%
goto message
:askfolder
set /p fldr="Folder (C:\%HOMEPATH%\Documents\Folder): "
set fldr=%HOMEPATH%\Documents\%fldr%
:message
if "%2%" == "" goto askmessage
set msg=%2%
goto run
:askmessage
set /p msg="Commit message: "
:run
echo %fldr%
echo %msg%
c:
cd %fldr%
git add -A
git commit -m "%msg%"
git push
pause
goto end
:help
echo.
echo Usage:
echo push.bat UserName "message"
echo.
pause
:end
@rem cd back to where we started
popd
endlocal