123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- #!/bin/sh
- case $1 in
- a)
- git add `echo "$@" | cut -w -f 2-1000`
- exit 0
- ;;
- l)
- git log
- exit 0
- ;;
- s)
- git status
- exit 0
- ;;
- p)
- git pull
- exit 0
- ;;
- P)
- git push
- exit 0
- ;;
- c)
- git commit $2
- exit 0
- ;;
- C)
- git checkout $2
- exit 0
- ;;
- M)
- git merge $2
- exit 0
- ;;
- b)
- git branch $2
- exit 0
- ;;
- d)
- git diff
- exit 0
- ;;
- r)
- git restore $2
- exit 0
- ;;
- q)
- break
- ;;
- *)
- git status
- ;;
- esac
- while :
- do
- echo "?"
- read cmd
- case $cmd in
- s)
- git status
- ;;
- p)
- git pull
- ;;
- P)
- git push
- ;;
- c)
- git commit
- ;;
- q)
- break
- ;;
- *)
- echo "Unknown command."
- ;;
- esac
- done
|