zoukankan      html  css  js  c++  java
  • git分支小问题

    参考网址: http://hbiao68.iteye.com/blog/2055493

    1.查看分支

      git branch 或者 git branch -v

    2.创建一个新的分支

      git branch hss

    3.转换到新建的 testing 分支

      git checkout hss

    4.回到 master 分支

      git checkout master

    5.删除一个分支

      git branch -d hss    //如果该分支没有合并到主分支会报错

      或者

      git branch -D hss   //强制删除

    6.合并分支

      比如,如果要将开发中的分支(hss),合并到稳定分支(master),

                首先切换的master分支:git checkout master。

          然后执行合并操作:git merge hss。

            如果有冲突,会提示你,调用git status查看冲突文件。

            解决冲突

         然后调用git add或git rm将解决后的文件暂存。

         所有冲突解决后,git commit 提交更改。

         例如:将hss提交合并到当前分支(master)

         git merge hss

    7.查看文件状态

      git status

    8.git如何clone 远程github中的分支?

      git clone -b release_branch https://github.com/

    9.git rm xx文件

    # On branch create-views-question
    # Changes not staged for commit:
    #   (use "git add/rm <file>..." to update what will be committed)
    #   (use "git checkout -- <file>..." to discard changes in working directory)
    #
    #   deleted:    solr/data/development/index/_0.fdt
    #   deleted:    solr/data/development/index/_0.fdx
    #   deleted:    solr/data/development/index/_0.fnm
    #   deleted:    solr/data/development/index/_0.frq

      git rm xx.vue

      git commit -m "删除一个文件xx.vue"

      git pull origin master

      git push origin hss

      

  • 相关阅读:
    how to pass a Javabean to server In Model2 architecture.
    What is the Web Appliation Archive, abbreviation is "WAR"
    Understaning Javascript OO
    Genetic Fraud
    poj 3211 Washing Clothes
    poj 2385 Apple Catching
    Magic Star
    关于memset的用法几点
    c++ 函数
    zoj 2972 Hurdles of 110m
  • 原文地址:https://www.cnblogs.com/haimishasha/p/6686336.html
Copyright © 2011-2022 走看看