Why Git: Features and Advantages
1. Flexible Environment
Figure 1: Flexible Environment
• Git allows you to work on code in a local environment, then easily syn-
chronize changes with a remote repository.
• You can stage (prepare) specific changes, commit them to your local repos-
itory, and then push them to a remote server (e.g., GitHub or GitLab).
• This flexibility enables both individual and team workflows, allowing de-
velopers to experiment locally before sharing work.
2. Version Control System
Figure 2: Version Control System
• Git tracks changes in code files over time, allowing developers to modify,
record, revert, compare, and manage different versions of their code.
• Each modification is stored as a separate version, allowing easy navigation
between different stages of the project.
1
• Developers can revert to previous versions if needed, ensuring that mis-
takes or unwanted changes can be undone.
• Git also enables comparing versions to see exactly what was changed,
which is useful for debugging and reviewing updates.
3. Create and Manage Remote Repositories
Figure 3: Create and Manage Remote Repositories
• Git enables the creation and management of remote repositories, which
are stored on servers like GitHub, GitLab, or Bitbucket.
• Remote repositories facilitate collaboration by allowing multiple users to
access, pull, and push changes to a shared codebase.
• Developers can synchronize their local changes with the remote repository,
ensuring that all team members are working with the latest version of the
code.
4. Facilitates Branching and Merging
Figure 4: Facilitates Branching and Merging
2
• Git allows developers to create branches, which are isolated copies of the
codebase for working on specific features or bug fixes.
• Branching enables parallel development without affecting the main code-
base, allowing teams to work on multiple tasks simultaneously.
• Merging combines changes from different branches back into the main
branch, integrating features or fixes when they are ready for production.
5. Keeps Files in the Server Secure
Figure 5: Keeps Files in the Server Secure
• Git repositories can be configured with access control, allowing only au-
thorized users to access and modify files.
• Permissions can be set for each user, giving some users read-only access
while others may have full write access.
• This security setup ensures that sensitive code is protected and that
changes are made only by trusted contributors.