git 仓库相关命令

git配置文件 : .git/config

  配置存储远程连接用户信息   

[credential]        
    helper = store   
View Code

  配置www用户下默认git pull账号和密码,这样每一个新加的项目都不用输入账号

vim ~/.gitconfig;    chmod 600 ~/.gitconfig

[credential]
    helper = store

vim ~/.git-credentials;  chmod 600 ~/.git-credentials

https://www:123@gitlab.test.com

  

配置ssh远程连接,并加端口号

[remote "origin"]
        url = ssh://git@github.com:5209/root/Tools.git
View Code

  配置私有仓库关闭ssl认证

    git config --global http.sslVerify "false" 

  配置用户信息

     git config --global user.name "alex huang"

     git config --global user.email "alex@root.com"

原文地址:https://www.cnblogs.com/alex-hrg/p/8676296.html