美文网首页
Git 常用命令(待续)

Git 常用命令(待续)

作者: 勤奋的Garfield | 来源:发表于2017-08-24 21:19 被阅读0次

    Reference:

    Git

    git add filepath/filename
    git commit -av % commit本地的修改内容
    git config --global core.editor vim 修改git的默认编辑器为vim
    git reflog % 查看本地的git命令(只记录clone checkout clone)
    git rev-parse HEAD % 查看当前分支的版本号
    git log % 会显示所有人曾经的commit.
    git log --author="zhjhe"
    git log --decorate
    git log master..zhjhetest
    git log master..HEAD % 查看两个branch,或者两个节点之间的不同.
    git log master..HEAD --decorate

    git log A..B http://www.cnblogs.com/irocker/p/advanced-git-log.html
    >:~/Code/dkpro-core$ git reflog
    1880579 HEAD@{0}: checkout: moving from master to zhjhetest
    8c19525 HEAD@{1}: checkout: moving from zhjhetest to master
    1880579 HEAD@{2}: checkout: moving from master to zhjhetest
    8c19525 HEAD@{3}: checkout: moving from zhjhetest to master
    1880579 HEAD@{4}: commit: Use commond "git add" to add new file (<----I just forgot to do this step in the last commit).
    14c5525 HEAD@{5}: commit: Add Chinese CRF-NER model path to DKPro-CoreNLP(StanfordNLP), and add some print infos.
    8c19525 HEAD@{6}: checkout: moving from master to zhjhetest
    8c19525 HEAD@{7}: checkout: moving from zhjhetest to master
    8c19525 HEAD@{8}: checkout: moving from master to zhjhetest
    8c19525 HEAD@{9}: clone: from https://github.com/dkpro/dkpro-core.git
    

    提交时常用的组合命令:

    git diff
    git status
    git add filepath/filename
    git commit -av
    

    相关文章

      网友评论

          本文标题:Git 常用命令(待续)

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