• 技术文章 >Python技术 >Python基础教程

    python中Git分支操作

    小妮浅浅小妮浅浅2021-09-09 10:40:11原创3667

    1、关联远程分支,当前所在的分支还没有关联到远程分支的情况。

    git branch --set-upstream-to origin/develop

    分支合并。可以先切回到master分支然后使用git merge来做分支合并。

    2、在dev分支上完成开发任务之后,将dev分支上的成果合并到master。

    git switch <target-branch>
    git merge --no-ff <target-branch>

    3、删除分支,可以使用git branch加上-d参数。

    git branch -d <branch-name>
    error: The branch '<branch-name>' is not fully merged.
    If you are sure you want to delete it, run 'git branch -D <branch-name>'.
    git branch -D <branch-name>

    以上就是python中Git分支操作,希望对大家有所帮助。更多Python学习指路:python基础教程

    专题推荐:python git
    品易云
    上一篇:python希尔排序的用法 下一篇:python中分支管理策略的实现

    相关文章推荐

    • Python字典的特点• python使用VS接收数据• python快速排序算法的使用• 如何用python画月饼• python中的三种推导式介绍• python字符串翻转的方法• python单词大小写的方法整理• python冒泡排序算法的性能探究

    全部评论我要评论

    © 2021 Python学习网 苏ICP备2021003149号-1

  • 取消发布评论
  • 

    Python学习网