gt 792 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. #!/bin/sh
  2. case $1 in
  3. a)
  4. git add `echo "$@" | cut -w -f 2-1000`
  5. exit 0
  6. ;;
  7. l)
  8. git log
  9. exit 0
  10. ;;
  11. s)
  12. git status
  13. exit 0
  14. ;;
  15. p)
  16. git pull
  17. exit 0
  18. ;;
  19. P)
  20. git push
  21. exit 0
  22. ;;
  23. c)
  24. git commit $2
  25. exit 0
  26. ;;
  27. C)
  28. git checkout $2
  29. exit 0
  30. ;;
  31. M)
  32. git merge $2
  33. exit 0
  34. ;;
  35. b)
  36. git branch $2
  37. exit 0
  38. ;;
  39. d)
  40. git diff
  41. exit 0
  42. ;;
  43. r)
  44. git restore $2
  45. exit 0
  46. ;;
  47. q)
  48. break
  49. ;;
  50. *)
  51. git status
  52. ;;
  53. esac
  54. while :
  55. do
  56. echo "?"
  57. read cmd
  58. case $cmd in
  59. s)
  60. git status
  61. ;;
  62. p)
  63. git pull
  64. ;;
  65. P)
  66. git push
  67. ;;
  68. c)
  69. git commit
  70. ;;
  71. q)
  72. break
  73. ;;
  74. *)
  75. echo "Unknown command."
  76. ;;
  77. esac
  78. done