什么是git相当于下面的cvs命令 [英] What is git equivalent of the following cvs command

查看:135
本文介绍了什么是git相当于下面的cvs命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在从CVS转移到GIT。
我想知道下面的cvs命令和它的输出结果是什么?

  cvs -n checkout -p -r $ {RELEASE} $ {MODULE} 

我还需要git等效于以下cvs命令。



感谢您的帮助

解决方案

要检查repo是否存在,返回其他128返回

  ** git ls-remote --heads http:// user:pass@github.com:用户/ repo.git ** 

要检查分支是否存在于回购中,如果没有找到分支,否则打印一行

  ** git ls-remote --heads http:// user:pass@github.com: user / repo.git branch ** 

要检查标记是否存在于回购中,如果分支未找到否输出其他在线印刷

  ** git ls-remote --tags http:// user:pass@github.com :user / repo.git v7_3 ** 

以上两种情况的返回码是0 alw ays是否找到分支/标签


we are moving from cvs to git. I want to know what the following cvs commands does and its output

cvs -n checkout -p -r${RELEASE} ${MODULE}

I also need git equivalent of following cvs command.

Thanks for your help

解决方案

To check if repo exists, if exists 0 is returned else 128 is returned

**git ls-remote --heads http://user:pass@github.com:user/repo.git**

To check if branch exists in repo, if branch not found no output else one line is printed

**git ls-remote --heads http://user:pass@github.com:user/repo.git branch**

To check if tag exists in repo, if branch not found no output else on line is printed

**git ls-remote --tags http://user:pass@github.com:user/repo.git v7_3**

Return code in above 2 cases is 0 always whether branch/tag found or not

这篇关于什么是git相当于下面的cvs命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆