zoukankan      html  css  js  c++  java
  • 常用git操作命令

    《Pro Git》:https://git-scm.com/book/zh/v2

    git add 文件路径        添加某个文件

    git add . 添加所有文件

    git commit -m “备注” 

    git push origin daily/1.0.0 

    git checkout develop-branch //用来切换分支

    git checkout -b daily/1.0.0 //用来切换分支,没有则新建

    git pull 

    ————————————————————————————

    从分支上下载代码:

    git clone -b 

    releases/20171129164708245_r_release_67563_iotx-paas-admin-code  http://gitlab.alibaba-inc.com/IoTx/iotx-paas-admin.git

    (git clone -b +分支名+ http)

    或者 git clone + http 后 git checkout

    ————————————————————————————

    新建分支 git branch daily/1.0.4

    切换到分支:git checkout daily/1.0.4

    ————————————————————————————

    发布publish

    git tag -a publish/1.0.3 -m “备注”

    git push origin publish/1.0.3

    ————————————————————————————

    分支合并(尚未亲测)

    git clone $giturl

    git checkout <合并的目标分支>

    git merge <合并的来源分支>

    当合并结果有如下说明时,表示有冲突需要解决:

    CONFLICT (content): Merge conflict in < filepath >

    Automatic merge failed; fix conflicts and then commit the result.

  • 相关阅读:
    用WebStorm运行Vue项目
    秋招圆满结束
    最新的秋招进度 10月21号
    来更新一下秋招的进度~
    华为三面完进池子啦~9月17日
    C++ 迭代器失效问题
    C++类相关问题(空类、多态、重载、继承)
    C++各种变量、类型的存储位置
    写一个面试中场景题的总结
    明天要面阿里HR面了
  • 原文地址:https://www.cnblogs.com/linhongwenBlog/p/8697829.html
Copyright © 2011-2022 走看看