Browse Source

Update 'src/GitShell.xys'

天问 8 months ago
parent
commit
3154046a67
1 changed files with 30 additions and 26 deletions
  1. 30 26
      src/GitShell.xys

+ 30 - 26
src/GitShell.xys

@@ -8,36 +8,40 @@
 Git Shell...
 Git Shell...
 *********************/
 *********************/
 
 
-" 1. git init..."
+"* 1. git init..."
     run "git init"
     run "git init"
-" 2. git clone"
-    $a = input("Enter git reop URL", , , "m");
-    run "git clone $a"
-"2.1 git clone from clipboard"
-    run "git clone ""<clipboard>"""
-" 3. git commit..."
-    run "cmd /c ""git add --all && git commit -m ""Automatic Commit By liuyuqi"""""
-" 4. git auto(Git Automatic Commit & Push)..."
-    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"
-" 5. git pull"
-    run "cmd /k ""git pull"""
-" 6. git push..."
-    run "git push"
-" 7. git sync(pull/push)"
-    run "git pull && git push"
-" 8. git submodule init..."
+"* 2. git clone from clipboard"
+    $url = "<clipboard>";
+    if(substr($url,0,18) == "https://github.com"){
+        $url = replace($url,"https://github.com","https://hub.fastgit.xyz")
+    }
+    run "git clone --depth 1 -c http.proxy="""" -c https.proxy="""" $url";
+"  3. git commit..."
+    run "C:/Windows/System32/cmd.exe /c ""git add --all && git commit -m ""Automatic Commit By liuyuqi"""""
+"  3. git batch commit..."
+    run """D:\opt\checkGit\auto_commit.exe"" --path ""<curpath>"""
+"  4. git submodule init..."
     run "git submodule init"
     run "git submodule init"
-" 9. git log -5"
-    run """D:\Program Files\Git\bin\bash.exe"" -l -c ""git log -5 ; read -n1"""
-"10. git ls..."
+"  5. git branch -a"
+    run "cmd /k ""git branch -a"""
+"  6. git ls..."
     run """D:\Program Files\Git\git-bash.exe"" -l -c ""git ls ; read -n1"""
     run """D:\Program Files\Git\git-bash.exe"" -l -c ""git ls ; read -n1"""
-"11. git hist..."
+"  7. git hist..."
     run """D:\Program Files\Git\git-bash.exe"" -l -c ""git hist && read -n1"""
     run """D:\Program Files\Git\git-bash.exe"" -l -c ""git hist && read -n1"""
-"12. git archive..."
+"  8. git archive..."
     run "git archive --format zip --output master_src.zip master"
     run "git archive --format zip --output master_src.zip master"
-"13. git checkout..."
+"  9. git checkout..."
     run "git checkout ."
     run "git checkout ."
-"14. git reset(hard)..."
+"  10. git reset(hard)..."
     run "git reset --hard"
     run "git reset --hard"
-"15. git clean -n"
-    run "cmd /k ""git clean -n -d"""
+"  11. git remote -v"
+    run "cmd /k ""git remote -v && git remote -v | CLIP"""
+"* 12. git batch check update"
+    run  "D:\opt\checkGit\checkGit.exe" "<curpath>"
+"  13. git clean -n"
+    run "cmd /k ""git clean -n -d"""
+"  14. git branch"
+    if(strlen(listfolder(,".git", 2))>0){
+        $tmp=runret("git branch");
+        status (git) $tmp;
+    }