zoukankan      html  css  js  c++  java
  • git 是目前世界上最先进的分布式版本控制系统

    一、git 安装

      下载地址

    二、git 选项

    add 将文件内容添加到索引

    bisect 通过二进制查找引入错误的更改

    branch 列出,创建或删除分支

    checkout 检查分支或路径到工作树

    clone 将存储库克隆到新目录中

    commit 将更改记录到存储库

    diff 显示提交,提交和工作树等之间的更改

    fetch 从另一个存储库下载对象和引用

    grep 打印匹配图案的行

    init 创建一个空的Git仓库或重新初始化一个现有的

    log 显示提交日志

    merge 加入两个或更多的开发历史

    mv 移动或重命名文件,目录或符号链接

    pull 从另一个存储库或本地分支获取并合并

    push 更新远程引用以及相关对象

    rebase 转发端口本地提交到更新的上游头

    reset 将当前HEAD复位到指定状态

    rm 从工作树和索引中删除文件

    show 显示各种类型的对象

    status 显示工作树状态

    tag 创建,列出,删除或验证使用GPG签名的标签对

    三、git 企业开发更新gitlab操作示例

    • git init 
    • git config --local user.name 'Your English name'
    • git config --local user.email 'Your Email Address'
    • git remote add origin https://gitlab.com/{ Your English name }/{ Your warehouse name }.git
    • git fetch origin [dev_branch_name]
    • git branch -a
    • git checkout origin [dev_branch_name]
    • git pull origin [dev_branch_name]
    • git add .
    • git commit -m "Submit instructions"
    • git push origin [dev_branch_name]

    四、gitee 测试用例

    ssh -T git@gitee.com
    • git clone https://gitee.com/{ Your blog name }/{ Your warehouse  }.git
    • cd warehouse/
    • git init
    • git config --local user.name "Your blog name"
    • git config --local user.email "Your email address"
    • git add .
    • git commit -m "first commit to master"
    • git remote add origin https://gitee.com/{ Your blog name }/{ Your warehouse  }.git
    • git push
    • git push --set-upstream origin master
    • git branch -a
    • git checkout -b dev
    • git push --set-upstream origin dev
    • git add .
    • git commit -m "first commit to dev"
    • git push
    • git checkout master
    • git merge dev    合并本地dev分支指向本地master主支
    • git push

    五、删除远程分支

    • git branch -a
    • git push origin --delete dev_branch_name
     

     

     

  • 相关阅读:
    hadoop架构
    hdfs存储模型
    C语言编译过程
    linux文件类型和权限
    推荐系统效果评估
    推荐系统冷启动
    Js计算-当月每周有多少天
    3D动画
    固定边栏——淘宝滚动效果
    jquery图片轮播-插件
  • 原文地址:https://www.cnblogs.com/justblue/p/12977721.html
Copyright © 2011-2022 走看看