Skip to main content

Command Palette

Search for a command to run...

Day 8 - Basic Git & GitHub for DevOps Engineers

Updated
4 min readView as Markdown
Day 8 - Basic Git & GitHub for DevOps Engineers
T

Hey there! 👋

I'm Tushar Ranjan, a DevOps Engineer passionate. Currently, on a learning adventure, I'm here to share my journey and Blogs in the world of cloud and DevOps.

🛠️ My focus? Making sense of AWS services, improving CI/CD, and diving into infrastructure as code. Whether you're fellow interns or curious enthusiasts, let's grow together in the vibrant DevOps space.

🌐 Connect with me for friendly chats, shared experiences, and learning moments. Here's to embracing the learning curve and thriving in the exciting world of AWS DevOps Technology!

What is a Version Control System?

A Version Control System (VCS) is software designed to keep track of changes made to files over time. It allows you to undo or cancel changes and revert files or entire projects to previous versions. VCS is essential for managing projects with multiple files and for collaborating with other developers, as it helps track who made changes, what changes were made, and why they were made.

Types of Version Control Systems

There are three main types of VCS: Local VCS, Centralized VCS, and Distributed VCS.

Local Version Control System (LVCS)

A Local VCS stores all file changes as patches in a local database on your computer. Each patch contains only the changes made to a file since its last version. To view the file at a specific point in time, you must apply all relevant patches up to that moment. The main drawback of LVCS is that if the local database is lost or corrupted, all patches and changes made after the affected version are also lost. Additionally, collaborating with others is nearly impossible.

Centralized Version Control System (CVCS)

A Centralized VCS uses a single server to store all file versions. Multiple clients can access, pull, and push files to and from this server. This setup allows team members to know what others are working on, facilitating easier collaboration. However, if the central server fails, no one can save changes, pull files, or collaborate. If the central database becomes corrupted and backups aren't available, the entire project history is lost. Popular examples of CVCS include ClearCase and SVN.

Distributed Version Control System (DVCS)

In a Distributed VCS, clients don’t just check out the latest snapshot of files; they fully mirror the repository, including its full history. Each collaborator has a complete local copy of the project, which includes the entire history. If the server goes down, any client repository can send a copy of the project to another client or back to the server once it’s available. This model ensures that as long as one client has a complete copy, the project can be fully restored. Git is the most well-known example of a DVCS.

What is Git?

Git, short for Global Information Tracker, is an open-source version control system used for source code management. It tracks changes in your source code and maintains a version history, allowing multiple developers to collaborate on a project. Changes can be tracked and reverted if necessary.

What is GitHub?

GitHub is a platform that hosts code for version control and collaboration. It allows you and others to work together on projects from anywhere, making it easy to share code files and collaborate on open-source projects. GitHub also serves as a social networking site where developers can network, collaborate, and showcase their work.

Why Use DVCS Over CVCS?

Better Collaboration

In a DVCS, every developer has a full copy of the repository, including its entire history. This makes collaboration easier since developers don’t need to constantly communicate with a central server to commit their changes or see changes made by others.

Greater Flexibility

DVCS allows you to work offline, as you have the entire history of the code on your hard drive. This means you can make changes to your own repository without needing an internet connection, unlike in CVCS.

Faster Operations

With DVCS, you don’t need to communicate with a remote server for every command. All operations are performed locally, making it faster than CVCS.

Time Savings

Working on branches is easy in DVCS. Developers can share their changes before merging them into the remote server. In CVCS, working on branches is more time-consuming because it requires direct communication with the server.

Enhanced Security

If the main server goes down in a DVCS, you can still recover the entire history of the code from your local repository. In CVCS, if the single remote server fails, the entire code history is lost.

Conclusion

Version Control Systems are essential tools in software development for tracking changes, managing different versions of a project, and enabling collaboration. Git, a widely used distributed VCS, is known for its efficiency, flexibility, and speed. It allows developers to work seamlessly in parallel, branch and merge code easily, and provides a robust, decentralized structure for code repositories. VCS, particularly Git, is crucial in modern software development, ensuring efficient collaboration and maintaining the integrity and traceability of code changes.

~ Tushar Ranjan🙂

More from this blog

Tushar Ranjan's blog

72 posts