In this article, we will see how to save GitHub username, email, and password globally on your computer.
While working with github it is better to save your username and password on your computer so that you don't have to type your github username and password every time you have to pull or push your changes in git.
The global values mean the value will be applied to a particular user of an operating system. This information is stored in the
~/.gitconfig file in our home directory.
Follow the steps below :
To save the Git username globally, run the git command:
git config --global user.name "Your User Name"
To save the Git email address globally, run the git command:
git config --global user.email "Your Github Email"
Now all your future commits will be referred to this information.
Once you have saved your username and email, the next time you push your commit, it will show you a password prompt.
Enter the password and it will be saved.