5 Easy steps to change Username and Password in Gitbash

When you work with Github repositories, you need your credentials (username and password) for important operations like pushing and pulling changes to and from remote repositories.

In this article, I wanted to share with you an easy way to configure locally your credentials in Git bash.

What is Git Bash?

Git Bash is a command line that allows Windows users to use Git functions, it allows users to interact with Git, and run Unix commands directly from the command line.

You can download the installer from the Official Site click here

Set Git credentials

Now that we know what is Gitbash let’s discuss about how to set your Git credentials in Git Bash.

Step 1: Open a new Git Bash window.

Step 2: Set username.

Type the next command replacing “your-git-username” with your username.

$ git config –global user.name “your-git-username”

Step 3: Set email.

Type the next command replacing “your@git-email.com” with your primary email used in Git.

$ git config –global user.email “your@git-email.com”

Step 4: Set Password

Type the next command replacing “1234321” with your password used in Git.

$ git config –global user.password “1234321”

Step 5: Save your credentials

Type the next command for saving your changes forever.

$ git config –global credential.helper store

Finally, If you want to check your input saved, just run the next command in your Git Bash window:

$ git config –list –show-origin

For more reference, you can visit my Github repository @rafaelxoliolab.

Leave a Reply

Your email address will not be published. Required fields are marked *