What is version control ?
Version Control is very important for any developer to keep track of code changes and simplify code management when we work with a team of developers.
It supports
Tracking Changes: Records changes to files over time, allowing you to see what changed, when, and by whom.
Collaboration: Allows multiple people to work on the same project without conflicts.
History: Keeps a record of changes, enabling you to revert to previous versions.
Branching: Lets you create separate branches for new features and merge them later.
Why do we need Version Control?
Collaboration: Multiple people can work on the same project without overwriting each other’s work.
Backup: Safeguards your code by allowing you to revert to a previous working state.
Tracking: Helps monitor project progress and identify when issues were introduced.
Experimentation: You can test new features safely using branches without affecting the main codebase.
In a development team, think of version control like a shared codebase where multiple developers work on different features (branches) without overwriting each other’s work. If a bug is introduced, you can track changes, revert to a previous version, and merge the new features once they’re tested and ready. It ensures smooth collaboration and helps manage project history.
To implement version control in this course, we will be using Git. Git is a distributed version control system used to track changes in code and manage source code history.
Git is the foundation for platforms like GitHub, GitLab, and Bitbucket, which provide additional collaboration tools like pull requests and issue tracking.
We will be using Github as the platform for application development.
CREATING A GITHUB ACCOUNT
Sign up with Github and choose a free plan in this link - https://github.com
SETTINGS UP GIT on macOS
Install Git:
- Open the Terminal.
- Check if Git is already installed by running:
git --version
- If not installed, Git is often pre-installed on macOS. If it’s not, install it via Homebrew:
brew install git
Configure Git:
Set your global username and email for Git (used for commits):
git config --global user.name "Your Name"
git config --global user.email "youremail@example.com"
Verify Configuration:
- Verify your settings:
git config --list
- Verify the installation
git --version
SETTINGS UP GIT on Ubuntu
Install Git:
- Open the Terminal.
- First, update the package list:
sudo apt update
- Install Git:
sudo apt install git
Configure Git:
- Set your global username and email for Git (used for commits):
git config --global user.name "Your Name"
git config --global user.email "youremail@example.com"
Verify Configuration:
- Verify your settings:
git config --list
- Verify the installation
git --version
Top comments (0)