• Git dev分支合并到master分支完美实战


    aa@aa-PC MINGW64 /f/online-center/cloud/server-functions_services (master)                                                               
    $ git branch -a  #先查看下当前的本地和远程分支
    * master
      remotes/origin/HEAD -> origin/master
      remotes/origin/dev
      remotes/origin/master


    aa@aa-PC MINGW64 /f/online-center/cloud/server-functions_services (master)
    $ git checkout -b my_dev origin/dev  #或者是切换到本地的my_dev分支,假如已经存在的话,即git checkout my_dev 
    Switched to a new branch 'my_dev'
    Branch 'my_dev' set up to track remote branch 'dev' from 'origin'.


    aa@aa-PC MINGW64 /f/online-center/cloud/server-functions_services (my_dev)
    $ git pull #将本地分支my_dev对应的远程分支dev拉下来
    remote: Counting objects: 33, done.
    remote: Compressing objects: 100% (20/20), done.
    remote: Total 33 (delta 11), reused 32 (delta 10)
    Unpacking objects: 100% (33/33), done.
    From 192.168.5.222:interlive/cloud/server-functions_services
       9b3c7c5..dcdb51b  dev        -> origin/dev
    Updating 9b3c7c5..dcdb51b
    Fast-forward
     content/pom.xml                                   |  24 +-
     .../java/com/interlive/services/common/Constant.java  |   4 +
     .../com/interlive/services/common/RedisClient.java    |   7 -
     create mode 100644 content/src/test/java/com/interlive/services/controller/ControllerTest.java


    aa@aa-PC MINGW64 /f/online-center/cloud/server-functions_services (my_dev)
    $ git checkout master #切换到master分支
    Switched to branch 'master'
    Your branch is up to date with 'origin/master'.


    aa@aa-PC MINGW64 /f/online-center/cloud/server-functions_services (master)
    $ git pull #确保master分支也是最新的
    Already up to date.


    aa@aa-PC MINGW64 /f/online-center/cloud/server-functions_services (master)
    $ git merge my_dev #执行合并的关键代码,此时执行结果时将本地的my_dev合并到本地master分支
    hint: Waiting for your editor to close the file... Auto-merging content/src/main/java/com/interlive/services/common/Constant.java
    Merge made by the 'recursive' strategy.
     content/db/.sql                            | 34 +++++++++
     .../java/com/interlive/services/common/Constant.java  |  4 +
     16 files changed, 490 insertions(+), 9 deletions(-)
     create mode 100644 content/src/main/java/com/interlive/services/controller/Controller.java


    aa@aa-PC MINGW64 /f/online-center/cloud/server-functions_services (master)
    $ git push origin master #将合并的本地master分支推送到远程master
    Counting objects: 16, done.
    Delta compression using up to 4 threads.
    Compressing objects: 100% (13/13), done.
    Writing objects: 100% (16/16), 1.48 KiB | 504.00 KiB/s, done.
    Total 16 (delta 9), reused 0 (delta 0)
    To 192.168.5.222:interlive/cloud/server-functions_services.git
       d970c11..edaa065  master -> master

  • 相关阅读:
    逗号操作符使用小技巧
    字符解码?
    画图 wx.Window pen
    进程和线程
    内存管理
    简单的文本编辑器
    迭代器 Iterator
    文件操作
    ebay api学习
    一,wxpython入门
  • 原文地址:https://www.cnblogs.com/cyl048/p/10232988.html
Copyright © 2020-2023  润新知