zoukankan      html  css  js  c++  java
  • cygwin配置git

    对于windows用户来说,使用git bash经常会出现乱码情况,那么一款优质高尚的软件,值得推荐一下了,那就是cygwin

    下载cygwin后,在安装过程中,安装git,安装vim编辑器

    然后会在安装目录下看到类linux目录结构:

    配置别名alias:

    打开vim /etc/bash.bashrc,添加:

    #自定义ls颜色

    alias grep='grep --color' # show differences in colour
    alias ls='ls -hF --color=tty --show-control-chars' # classify files in colour
    alias dir='ls --color=auto --format=vertical --show-control-chars'
    alias vdir='ls --color=auto --format=long --show-control-chars'
    alias ll='ls -la --show-control-chars' # long list
    alias la='ls -A --show-control-chars' # all but . and ..
    alias l='ls -lF --show-control-chars'
    ## 添加清屏处理
    alias clear='clearn'

    配置git设置:

    打开 vim ~/.gitconfig,添加:

    [user]
    name = #your name#
    emali = #your email# 

    [color]
    ui = true

    [alias]

    co = checkout
    br = branch

    lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit

     

    配置上传时忽略文件类型:

    vim ~/.gitignore,添加

    /bin/
    /work/
    /.gitignore
    .idea
    oskey
    oskey.pub
    */*.iml
    target
    target/*
    afbx.iml
    .git-credentials
    */.classpath
    */.settings/*
    */.project

    好了,保存,关闭cygwin后重新打开,切换到git项目目录

    发现ls后可以显示各种颜色,再看git lg

    git lg -p:查看详细修改

    the end...

    逃避不一定躲得过,面对不一定最难过
  • 相关阅读:
    Html.ActionLink 几种重载方式说明及例子
    2 python 文本特征提取 CountVectorizer, TfidfVectorizer
    模型调参---GridSearchCV
    1 NLP学习大纲
    pandas.dropna/isnull/fillna/astype的用法
    激活函数总结
    LeetCode--53 最大连续子序列(总结)
    LeetCode--44 通配符匹配
    LeetCode--Two_Sum
    css 背景图片自适应元素大小
  • 原文地址:https://www.cnblogs.com/yangzhenlong/p/5547388.html
Copyright © 2011-2022 走看看