設置記住密碼(默認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