美文网首页
Git 命令 修改已经 commit 但是还没有push的 co

Git 命令 修改已经 commit 但是还没有push的 co

作者: 星空冰淇淋 | 来源:发表于2018-05-29 10:08 被阅读10次

    以下大家应该经常用:

    git status
    git log
    git add .
    git commit -m "first commit"
    git push origin master
    git pull origin master
    git log --pretty=oneline
    

    修改已经 commit 但是还没有push的 commit message

    git commit --amend 可以修改最近一次的提交信息

    除此之外,还会进经常遇到要修改前几次的修改信息:

    git rebase --interactive 想修改的commit 的上一次commit 的hash 值

    git log --pretty=format:"%H - %an, %ar : %s" | grep log

    相关文章

      网友评论

          本文标题:Git 命令 修改已经 commit 但是还没有push的 co

          本文链接:https://www.haomeiwen.com/subject/ljkgjftx.html