-
Notifications
You must be signed in to change notification settings - Fork 5
/
repos.sh
executable file
·59 lines (58 loc) · 1.62 KB
/
repos.sh
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
#!/bin/sh
case "$1" in
"record" )
git commit -a
;;
"pull" )
git pull origin master
;;
"push" )
git push [email protected]:$2/autotie.git
;;
"changelog" )
git log --oneline
;;
"checkout" )
git checkout -- .
;;
"revert" )
git revert $2
;;
"add_remote" )
git remote add $2 [email protected]:$2/autotie.git
;;
"pull_remote" )
git remote add $2 [email protected]:$2/autotie.git || git fetch $2 && git merge $2/master
;;
"fetch" )
git fetch $2
;;
"merge" )
git merge $2/master
;;
"show_remote" )
git remote -v
;;
"tag" )
git tag -a $2
;;
"pushtag" )
git push [email protected]:$2/autotie.git --tag
;;
* )
echo "Help"
echo "./repos.sh record => record patch"
echo "./repos.sh pull => pull patch"
echo "./repos.sh push => push patch"
echo "./repos.sh changelog => show changelog"
echo "./repos.sh checkout => revert change code"
echo "./repos.sh revert => revert patch by id"
echo "./repos.sh add_remote => add new remote"
echo "./repos.sh fetch => fetch from remote"
echo "./repos.sh merge => merge from remote"
echo "./repos.sh pull_remote => pull from remote"
echo "./repos.sh show_remote => show remote"
echo "./repos.sh tag => tag version"
echo "./repos.sh pushtag => push tag"
;;
esac