GitShell.xys 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*********************
  2. @Author : liuyuqi
  3. @Contact : liuyuqi.gov@msn.cn
  4. @Time : 2019/07/23 05:54:37
  5. @Version : 1.0
  6. @License : (C)Copyright 2019 liuyuqi.
  7. @Desc : Git 项目常用操作
  8. Git Shell...
  9. *********************/
  10. " 1. git init..."
  11. run "git init"
  12. " 2. git clone"
  13. $a = input("Enter git reop URL", , , "m");
  14. run "git clone $a"
  15. "2.1 git clone from clipboard"
  16. run "git clone ""<clipboard>"""
  17. " 3. git commit..."
  18. run "cmd /c ""git add --all && git commit -m ""Automatic Commit By liuyuqi"""""
  19. " 4. git auto(Git Automatic Commit & Push)..."
  20. run "git add --all && git commit -am 'Automatic Commit By liuyuqi $(date '+%Y-%m-%d %H:%M:%S')' && git pull origin master && git push origin master ; read -n1"
  21. " 5. git pull"
  22. run "cmd /k ""git pull"""
  23. " 6. git push..."
  24. run "git push"
  25. " 7. git sync(pull/push)"
  26. run "git pull && git push"
  27. " 8. git submodule init..."
  28. run "git submodule init"
  29. " 9. git log -5"
  30. run """D:\Program Files\Git\bin\bash.exe"" -l -c ""git log -5 ; read -n1"""
  31. "10. git ls..."
  32. run """D:\Program Files\Git\git-bash.exe"" -l -c ""git ls ; read -n1"""
  33. "11. git hist..."
  34. run """D:\Program Files\Git\git-bash.exe"" -l -c ""git hist && read -n1"""
  35. "12. git archive..."
  36. run "git archive --format zip --output master_src.zip master"
  37. "13. git checkout..."
  38. run "git checkout ."
  39. "14. git reset(hard)..."
  40. run "git reset --hard"
  41. "15. git clean -n"
  42. run "cmd /k ""git clean -n -d"""