Git - Understanding the Basics
Git is a version control system for tracking changes in files and coordinating work among multiple people.
- Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
- Git is a distributed revision control system, meaning that changes are stored in a central repository and can be accessed from any computer in the world.
1. On Windows
- Download the Git for Windows installer from here.
- Install the Git for Windows installer
2. On Linux
- Open a terminal and type
sudo apt update sudo apt install git
Open a terminal and type,
git config --global user.name "<YOUR_NAME>" git config --global user.email "<YOUR_EMAIL>"
To verify that your Git configuration is correct, open a terminal and type,
git config --list
This will show you the current configuration.
user.name = "<YOUR_NAME>" user.email = "<YOUR_EMAIL>"
Steps to make a Pull Request
1. Select a repo on GitHub
There are lots of repos on GitHub. You can search and find the repo you want. Choose the repo you want to pull requests from.
2. Fork the repo to your own account
3. Clone the repo to your local machine
HTTPS clone link and paste it in your terminal. The link is like
git clone <COPIED_LINK>
4. Open the repo in a code editor (for example, VS Code)
5. Change, Add, and Commit your changes
Make some changes to the repo. After that, add all the changes you made to the repo and commit them.
git add . git commit -m "Added some changes"
Push your changes to the remote repo.
git push origin main