GIT user configuration

Git user configuration is divided into global configuration and project configuration

  1. Global configuration

    Use the following command to configure

    git config --global user.name "yourusername"
    git config --global user.email "youremail"
    

    The configuration is stored in the [user] node of the ~/.gitconfig file

  2. Project configuration

    Use the following command to configure in the root directory of the current git project

    git config  user.name "yourusername"
    git config  user.email "youremail"
    

    The configuration is stored in the [user] node of the /project-root/.git/config file

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324934270&siteId=291194637