zoukankan      html  css  js  c++  java
  • git 操作

    1、回滚到某次的代码

    git reflog
    git reset - -hard HEAD@{21}    //这个是具体的reflog的号

    2、修改某次commit的信息
    第一种:修改最后一次

    git commit --amend  然后第一行 修改 再保存 再去 push

    第二种:修改好几次的

    git rebase -i HEAD~2    //此处的2是呈现最近的两条记录
    将需要更改的那次的pick改为edit   保存退出
    git commit --amend 保存退出
    git rebase --continue

     3、出现rebasing的情况

    git rebase --continue
    或者 git rebase --abort

     4、git rebase
       

    1、git log  拿到需要合并到的哪一项的前一项的commitId
    2、git rebase -i commitId   将需要合并的哪一项改为squash
    3、保存后 再push 
  • 相关阅读:
    leetcode
    leetcode
    leetcode
    leetcode
    Postman
    Fiddler抓百度和bing搜索包
    Jmeter脚本录制
    Android Studio使用Maven国内镜像
    Open Live Writer
    PureXXX使用手记
  • 原文地址:https://www.cnblogs.com/qianqiang0703/p/14865839.html
Copyright © 2011-2022 走看看