配置git 縮寫命令

配置git 縮寫命令, 修改~目錄下.gitconfig文件

[user]
        name = your name
        email = your email
# Please adapt and uncomment the following lines:
#       name = your name
#       email = your email
[alias]
    unstage = reset HEAD --
    br = branch
    co = checkout
    df = diff
    dfc = diff --cached
    st = status
    cl = reset --hard HEAD --
    cp = cherry-pick
    last = log -1 HEAD
    pt = format-patch --stdout HEAD^
    showf = show --name-status
    ci = commit
#graphical log
    glog = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
#short log
    slog = log --pretty=format:'%H - %an, %ar : %s' --name-only
#very short log
    vslog = log --pretty=format:'%H - %s : %an, %ci'
    vslog1 = log -n 10 --pretty=format:'%H - %an, %ar : %s'
    listtags = log --tags --simplify-by-decoration --pretty='format:%H %ai %d %s'
最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容

  • git基本操作與規范流程 git是個非常好用的版本工具,不但可以在linux下環境使用,還可以在windows下使...
    goodjcs閱讀 327評論 0 0
  • 安裝: windows安裝git-- msysgit是windows版的git,下載單獨的.exe按照默認選項安裝...
    alceyp閱讀 704評論 0 0
  • 下面是我整理的常用 Git 命令清單。幾個專用名詞的譯名如下。 Workspace:工作區 Index / Sta...
    晴天4327閱讀 213評論 1 2
  • git config —global user.name “Nshen” //必須git config —glob...
    困卡閱讀 378評論 1 9
  • 16宿命:用概率思維提高你的勝算 以前的我是風險厭惡者,不喜歡去冒險,但是人生放棄了冒險,也就放棄了無數的可能。 ...
    yichen大刀閱讀 6,087評論 0 4