zoukankan      html  css  js  c++  java
  • Git 远程分支常用操作

    # 查看远程仓库推拉地址,分支信息,分支跟踪情况等
    git remote show origin
    
    # 拉取远程仓库的变更内容到本地
    git fetch origin
    
    # 拉取并合并仓库的变更内容到本地
    git pull
    
    # 添加远程仓库跟踪地址
    git remote add
    
    # 推送本地的提交到远程仓库
    git push origin branch-name
    
    # 推送本地的提交到远程仓库的指定(新建)分支
    git push origin local-branch-name:remote-branch-name
    
    # 合并仓库的变更内容到本地
    git merge origin/branch-name
    
    # 从远程仓库中检出一个分支到本地的分支
    git checkout -b local-branch-name origin/remote-branch-name
    
    # 简写方式1
    git checkout --track origin/branch-name
    
    # 简写方式2
    git checkout branch-name
    
    # 修改本地分支的远程跟踪分支
    git branch -u origin/serverfix
    
    # 查看本地所有分支的跟踪情况,包括领先、落后情况
    git branch -vv
    
    # 删除远程分支
    git push origin --delete remote-branch-name
    
  • 相关阅读:
    MyBatis简介
    JDBC报错:Cannot find class: com.mysql.jdbc.Driver
    进程,线程,协程
    mamp提示 more elements...
    获取html页面的参数
    php基础函数
    返回接口
    生成订单号
    xml转数组
    判断是否是微信浏览器
  • 原文地址:https://www.cnblogs.com/danhuang/p/13159052.html
Copyright © 2011-2022 走看看