zoukankan      html  css  js  c++  java
  • github入门之更改提交操作--6

    1、回溯历史版本

    1.1、回溯到创建feature-A分支前

    1.1.1、要让仓库的HEAD、暂存区、当前工作树回溯到指定状态,需要用到提供目标时间点的哈希值

    1.1.2、回溯至未创建feature-A的状态

    1.1.3、查看当前的版本分支日志

     1.1.4、创建fix-B分支

     2、推进至feature-A分支合并后的状态

    2.1、查看需要回溯的哈希值

    首先恢复到feature-A分支合并后的状态。不妨称这一操作为“推进历史”。
    git log命令只能查看以当前状态为终点的历史日志。所以这里使用git reflog命令,查看当前仓库的操作日志。在日志中找出回溯历史之前的哈希值,通过 git reset --hard命令恢复到回溯历史前的状态。
    

     2.2、回溯

     3、消除冲突

    3.1、合并fix-B

    提示我们当前状态下README.md文件发生了冲突

    3.2、查看冲突文件

    3.3、使用vim命令进行内容合并

    3.4、提交解决后的结果

    4.1、修改提交信息

    4.2、查看日志

    -----------------------------------------------------------------------未完待续-----------------------------------------------------------------------

  • 相关阅读:
    Enum, Generic and Templates
    Writing A Threadpool in Rust
    A First Look at Rust Language
    Closures in OOC
    Complexity Behind Closure
    Introduction to OOC Programming Language
    OOC,泛型,糟糕的设计。
    Enlightenment笔记
    Machine Learning/Random Projection
    Machine Learning/Introducing Logistic Function
  • 原文地址:https://www.cnblogs.com/m-bianbian/p/6822943.html
Copyright © 2011-2022 走看看