-
Notifications
You must be signed in to change notification settings - Fork 17
/
git_push.bat
103 lines (62 loc) · 1.59 KB
/
git_push.bat
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
git config --global core.quotepath false
git config --global gui.encoding utf-8
git config --global i18n.commit.encoding utf-8
git config --global i18n.logoutputencoding utf-8
git config --global user.name "wotupset"
git config --global user.email "[email protected]"
git --version
rem git config --list
git add -A
git commit -am "Auto-committed on %date%"
git pull "github-ssh" master
git push "github-ssh" master
pause
exit
echo %date:~0,10%,%time:~0,5%>>version.txt
ssh-keygen -t rsa
echo %date:~0,10%,%time:~0,5%>>version.txt
echo *.bat > .gitignore
ssh-keygen -t rsa -b 4096 -C "[email protected]"
git clone --depth=1 https://github.com/wotupset/jphanime_data.git
set GIT_PATH="..\PortableGit\bin\git.exe"
set BRANCH="github"
%GIT_PATH% config --list
%GIT_PATH% --version
%GIT_PATH% add -A
%GIT_PATH% commit -am "Auto-committed on %date%"
%GIT_PATH% pull %BRANCH%
%GIT_PATH% push %BRANCH%
pause
exit
%GIT_PATH% push -u github master
pause
exit
set BRANCH2="oschina"
rem pause
%GIT_PATH% push %BRANCH2%
pause
exit
git config --global user.name "wotupset"
git config --global user.email "[email protected]"
git config --list
git config --global push.default simple
@echo off
echo type "c (commit)" or "u (update)"
cd .
set GIT_PATH="C:\Program Files\Git\bin\git.exe"
set BRANCH = "origin"
:P
set ACTION=
set /P ACTION=Action: %=%
if "%ACTION%"=="c" (
%GIT_PATH% add -A
%GIT_PATH% commit -am "Auto-committed on %date%"
%GIT_PATH% pull %BRANCH%
%GIT_PATH% push %BRANCH%
)
if "%ACTION%"=="u" (
%GIT_PATH% pull %BRANCH%
)
if "%ACTION%"=="exit" exit /b
pause
goto P