A Little About Git
in simple words, Git is a software that keeps a record of changes you have made in your file and can always undo those changes whenever you want (obviously not by Ctrl + z) and can also see who has made changes in the file
It is used majorly by developers to maintain their projects but non-developer can also use it. For non-developers, my father will write a blog on how git saves his meeting ๐
Now back to the topic
Steps to Download Git on Windows and Ubuntu
- Very Basic, Search git on your favorite search engine (mine google, and Duckduckgo), then click on Downloads
Now you will see something like this depending on your OS
on Windows
on Ubuntu
- Click on Download shown on monitor like image
On Windows, click on 'Click here to download it will download the complete setup
On Ubuntu, these commands will help you to install git. so for this open your terminal by using Application Menu or Ctrl + Alt + T
Let's First Discuss how to install it on Ubuntu because its shorter than on Windows
Installing Git on Ubuntu
You just have to follow the commands mentioned above to install git
I hope you have opened your terminal
- Enter
git --version
to see if it is already installed or not, if not then you will see something like this
- Now, Use
sudo add-apt-repository ppa:git-core/ppa
and press enter to continue
- After that, use
sudo apt update
- Now the final one,
sudo apt install git
and press y and just relax and wait for its completion.
Now check again git --version
and you will see this
Now head to configure a part
Installing Git on Windows
It's not that hard to install, although you see a lot of options to check or uncheck but you don't need to worry. You just have to click on 'next' multiple times without changing anything
I am gonna show you some screen images that you will encounter while installing so if you wanna see them for reference you can or you can just skip them and jump to configure part
[NOTE: If you are a beginner then just follow the steps and don't change anything but if you are experienced and reinstalling git, you can change the options ]
Configure Git on Both Windows and Ubuntu
On Windows you will use the commands in git bash just right-click in any folder or on your desktop and select Open in Git Bash
On Ubuntu, you can just use your Terminal
Configure Git
The configure part is the same for both the OS
let's set the username which will be used to determine that you have made the commit. For this use the command
git config --global user.name your_username
In the place of your_username enter your username which you use in your GitHub accountnow set your email which is your GitHub account email use
git config --global user.email your_email
In place of your_email enter your email
On Ubuntu
On Windows
To check whether you have entered the correct username or email use the following commands:
git config --global user.name
git config --global user.email
On Ubuntu
On Windows
This is my First Blog Hope This Blog Helped you ๐
Now for more blogs like this follow me on Hashnode and other social media handles
Hashnode: https://hashnode.com/@vilgad
Twitter: https://twitter.com/vilgad_
Github: https://github.com/vilgad