git 配置文件

設置記住密碼(默認15分鐘):

git config --global credential.helper cache

如果想自己設置時間,可以這樣做:

git config credential.helper 'cache --timeout=3600'

這樣就設置一個小時之後失效

長期存儲密碼:

git config --global credential.helper store

在隱藏文件夾.git/config:

[core]
    repositoryformatversion = 0
    filemode = false
    bare = false
    logallrefupdates = true
    symlinks = false
    ignorecase = true
    hideDotFiles = dotGitOnly
[remote "meicai"]
    url = https://git.sprucetec.com/meixiansong-java/tms-track.git
    fetch = +refs/heads/*:refs/remotes/meicai/*
[remote "dyq"]
url = https://git.sprucetec.com/duyinqiang/tms-track.git
fetch = +refs/heads/*:refs/remotes/dyq/*


 [alias]  
      st = status  
      ci = commit  
      br = branch  
      co = checkout  
      df = diff  

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章