• git log友好显示


    查看commit 提交日志

    $ git log

    $git log --pretty=oneline

    $git reflog

      显示所有提交记录,包括已经回退的提交,如图:提交了abc 和 bb 然后回退到 abc   $git log  只显示abc提交  可以使用 $git reset --hard commit号 回退到bb

     

    git reflog和git cherry-pick找回已删除的commit记录

    git cherry-pick用于把另一个本地分支的commit修改应用到当前分支。

    办法之一: 使用 cherry-pick.  根据git 文档:
    Apply the changes introduced by some existing commits 
    就是对已经存在的commit 进行apply (可以理解为再次提交)
    简单用法
    git cherry-pick <commit id>
    例如:
    $ git checkout old_cc
    $ git cherry-pick 38361a68
    1. 如果顺利,就会正常提交。结果:
    Finished one cherry-pick.
    # On branch old_cc
    # Your branch is ahead of 'origin/old_cc' by 3 commits.
    2. 如果在cherry-pick 的过程中出现了冲突
    Automatic cherry-pick failed.  After resolving the conflicts,
    mark the corrected paths with 'git add <paths>' or 'git rm <paths>'
    and commit the result with: 
     
            git commit -c 15a2b6c61927e5aed6718de89ad9dafba939a90b
     
    就跟普通的冲突一样,手工解决:

     

     

  • 相关阅读:
    大数据总结
    spark_streaming_微批量处理
    spark_sql_解析器
    spark_sql_函数
    spark-sql-04-spark连接hive的几种方式
    spark-sql-04-on_hive
    spark-sql-04-hive
    CF550C Divisibility by Eight
    CF489C Given Length and Sum of Digits...
    CF550A Two Substrings
  • 原文地址:https://www.cnblogs.com/jiechn/p/4174072.html
Copyright © 2020-2023  润新知