Git学习

作者: LiShang007 | 来源:发表于2019-05-29 09:07 被阅读0次

    由于之前公司项目管理使用的是svn,现在在新公司使用Gitlab,对git命令不是很熟悉。

    git配置用户信息
    git config --global user.name
    git config --global user.email

    创建公钥
    执行命令 ssh-keygen -t rsa -c "用户信息" 会在.ssh 目录下生成一个私钥 id_rsa和一个公钥id_rsa.pub

    拉取代码
    git clone git@xxxx/xxx.git (默认主分支)

    拉取分支代码
    git clone -b 分支名 git@xxxx/xxx.git

    查看本地分支
    git branch

    查看全部分支
    git branch -a

    切换分支
    git checkout -b 分支名

    相关文章

      网友评论

          本文标题:Git学习

          本文链接:https://www.haomeiwen.com/subject/wbtetctx.html