How to run git commands on remote without having local repo

后端 未结 2 1848
一向
一向 2020-12-17 13:57

I have a script called \'git-export\' which helps me to export a remote repository. It is run like that:

git-export http://host.com/git-repo <-t tag or -b         


        
2条回答
  •  隐瞒了意图╮
    2020-12-17 14:40

    You can use curl for checking if the specific url exists or not for example when i try to hit angularjs existing url

    $ curl -I https://github.com/angular/angularjs.org/tree/master/src
    **HTTP/1.1 200 OK**
    Server: GitHub.com
    Date: Mon, 11 Aug 2014 15:22:40 GMT
    

    When I hit on a wrong URL

    $ curl -I https://github.com/angular/angularjs.org/tree/master/abcd
    **HTTP/1.1 404 Not Found**
    Server: GitHub.com
    Date: Mon, 11 Aug 2014 15:24:06 GMT
    

    Hope this helps

提交回复
热议问题