Header Ads

How to Install Git and Basic Git Configuration

 1. How to install Git

  download link of git for Windows : Click Here for Windows Git

  download link of git for Mac : Click Here for Mac Git

  download link of git for Linux :  Click Here for Linux Git




2.  Git Configuration on Local Computer

After Installation, first we have to tell Git who we are . Every snapshot of the File System will contain information that who is the author of this snapshot.

So this is done to know whenever the application is broken and will come to know who broke the application or who created defect in the application.

Unless you won't tell Git who you are then you are not able to commit changes to the repository. So to tell who you are ,you have to configuration on Git

Bash by using following commands. 


Steps to configure Git using Git Bash are:

1. Open File Explorer of your computer (That means Go inside in any Drive of your computer)

2. Right click anywhere and see "Git Bash" in Menu Option. Click Enter.

3. Git Bash window will be opened

4.type command to set your Name :    git config --global user.name "Git Project"

5. Here Instead of Git Project ,type your Name.

6. type command to set your email :  git config --global user.email "example@example.com"    

7. Here Instead of  example@example.com , type your mail id.



3. How  to check which User name is set to Git?

Steps to check User name set to Git are: 

1. Open File Explorer of your computer (That means Go inside in any Drive of your computer)

2. Right click anywhere and see "Git Bash" in Menu Option. Click Enter.

3. Git Bash window will be opened

4. Type command on git bash : git config user.name

5. Result will be displayed on Git Bash


4. How  to check which User email is set to Git?

Steps to check User name set to Git are: 

1. Open File Explorer of your computer (That means Go inside in any Drive of your computer)

2. Right click anywhere and see "Git Bash" in Menu Option. Click Enter.

3. Git Bash window will be opened

4. Type command on git bash : git config user.email

5. Result will be displayed on Git Bash


5. Ho to know values of all properties set in Git ?

Steps to check User name set to Git are: 

1. Open File Explorer of your computer (That means Go inside in any Drive of your computer)

2. Right click anywhere and see "Git Bash" in Menu Option. Click Enter.

3. Git Bash window will be opened

4. Type command on git bash : git config --list

5. Result will be displayed on Git Bash


6. How to set Default Editor like notepad or notepad++ to Git?

1. Open File Explorer of your computer (That means Go inside in any Drive of your computer)

2. Right click anywhere and see "Git Bash" in Menu Option. Click Enter.

3. Git Bash window will be opened

4. Type command on git bash : git config --globally core.editor "C:/ProgramData/Microsoft/Windows/Start Menu/Programs/Notepad++/notepad++.exe"


7. How to set Windows notepad as a default text editor in git

  To Set Windows notepad as a default text editor in git type following command on GitBash:

    git config --globally core.editor "notepad"


8. What is Git Bash


 Git Bash is a special application for Microsoft Windows that provides functionality of Git Command Line. Here Bash is a shell used for Linux and Mac and it was initially present for Linux and Mac and Not for Windows OS, so Git Bash is specially launched for Windows OS. Shell is a terminal application that interacts with Operating systems like Linux ,Mac and Windows.

 Shell(terminal application) is used for creation of file,copying of file etc .It is used to interact with Git in Windows


Summary : Git Bash is a Shell for Windows .Shell Is a Terminal Application . Terminal Application interacts with Git in Windows. That means Git Bash interacts with Git for all operations like creation of repository, cloning of repository ,merging of branches, committing changes to repository etc 


4. What is Git GUI

Git GUI is a Git's Graphical User Interface. That means whatever Git operation we are doing on Git bash by using commands, that same operations can be done by clicking buttons on Git GUI. So Git GUI is a simple way to perform Git operations. 


5. What is Git Repository

Git Repository is a '.git' folder inside your project. This Folder consist of multiple files which has Git configuration as well as current project history to track 

 all changes made in the project


List of All Commands that we have seen today:

1.  git config --global user.name "Your Name"

2. git config --global user.email "yourmailid@example.com"

3. git config user.name

4. git config user.email

5. git config --list

6. git config --globally core.editor "C:/ProgramData/Microsoft/Windows/Start Menu/Programs/Notepad++/notepad++.exe"

7. git config core.editor

No comments