日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

cygwin配置git

發布時間:2023/12/2 编程问答 32 豆豆
生活随笔 收集整理的這篇文章主要介紹了 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...

轉載于:https://www.cnblogs.com/yangzhenlong/p/5547388.html

總結

以上是生活随笔為你收集整理的cygwin配置git的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。