Open In App
Related Articles

How to Set Git Username and Password in GitBash?

Improve Article
Save Article
Like Article

Git is an open-source version control system. Git is software that helps to track updates in any folder. It is a DevOps resource used mostly for source code planning. It’s typically used to promote collaboration between coders who are relying on source code together during software development. Speed, the integrity of data, including support for dispersed, non-linear workflows are among the aims.

A terminal Git environment is handled by Git Bash (Bash, an acronym for Bourne Again Shell).  Git Bash replicates a bash terminal on Windows. It allows you to use all git tools or most other typical Unix commands from the command line. If you’re used to Linux and want to preserve your routines, this is a great alternative.

Git is usually bundled as one of the elevated GUI applications in Windows settings. Bash is a popular Linux and Mac OS default shell. On a Windows operating system, Git Bash is a package that installs Bash, some standard bash utilities, and Git.  The fundamental version control system primitives may be abstracted and hidden by Git’s GUI. Git Bash is a Microsoft Windows software that functions as an abstraction shell for the Git command-line experience. A shell is a console application that allows you to interact with your operating system by command prompt.

Now let us discuss how to set Git Username and Password in Git Bash

Step 1: After the successful installation of Git on your system, you have to right-click wherever you want to open the Git tab. Click on the Git Bash Here icon. Now here we will see the location of where the program is opened when the window opens.

Git Bash opened on Desktop.

Step 2: In the Git Bash window, type the below command and press enter. This will configure your Username in Git Bash.

$ git config --global "GeeksforGeeks"

Step 3: After that, you will have to configure your email. For that, type

$git config --global "GFGexample@gmail.orgg"

Step 4: To set your password, type the below command as depicted:

$git config --global user.password "1234321"

Step 5: To save the credentials forever, type the below command as depicted:

$ git config --global credential.helper store

This is how you set git username and password in git bash.

To check the inputs, type the below command as depicted:

git config --list --show-origin

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Last Updated : 15 Jun, 2022
Like Article
Save Article
Similar Reads
Complete Tutorials