Skip to main content

Command Palette

Search for a command to run...

Understanding Version Control: Central vs Distributed Systems and Git vs GitHub

Updated
β€’4 min readβ€’View as Markdown
Understanding Version Control: Central vs Distributed Systems and Git vs GitHub
P

πŸ‘‹ Hello! I'm passionate about DevOps and have over 1+ years of experience in the field. I'm proficient in a variety of cutting-edge technologies and always motivated to expand my knowledge and skills. Let's connect and grow together!

SKILLS:

πŸ”Ή Languages & Runtimes: Python, Shell Scripting, HCL, YAML πŸ”Ή Cloud Technologies: AWS, Microsoft Azure, GCP πŸ”Ή Infrastructure Tools: Docker, Terraform, AWS CloudFormation πŸ”Ή Other Tools: Linux, Git and GitHub Actions, Jenkins, Jira, GitLab (beginner), Docker, AWS DevOps πŸ”Ή Web Development: HTML, CSS, Bootstrap, Python, SQL

Job & Responsibilities:

πŸš€ Improved development efficiency by implementing CI/CD pipelines, resulting in a 30% reduction in deployment time on the test server. πŸ”’ Strengthened deployment and testing reliability by utilizing Docker containers and optimizing Dockerfile, reducing development issues on the test server by 20%. βš™οΈ Automated S3 bucket log creation with Shell scripting, eliminating 100% of manual search and saving 2 hours per week. πŸ“… Scheduled EC2 instance start/stop using Lambda functions and Event Bridge, leading to a 25% decrease in infrastructure costs. πŸ”§ Utilized AWS, Linux, Python, Docker, Shell scripting, Terraform, Jenkins Pipelines, and automation to streamline workflows and improve overall system performance.

I'm very detail-oriented and possess strong written and verbal communication skills. As a high performer with a possibility mindset, I strive to solve problems using efficient approaches.

Let's Connect & Grow:

If you find my profile suitable for the role you are searching for, please feel free to reach out to me at sumanprasad9766@gmail.com.

πŸ“ Introduction:

Have you ever been in a situation where you lost an important piece of code or struggled to maintain different versions of your codebase? If yes, then version control might be the solution you're looking for. In this blog, we'll discuss what version control is, the differences between central and distributed version control systems, and the difference between Git and GitHub.

πŸ”ΉWhat's Version Control?

Version control is the process of managing and tracking changes made to a file or a set of files over time. It helps to achieve two main objectives: manageability and versioning of code. With version control, you can keep track of changes made to your codebase, collaborate with others, and maintain different versions of your code.

πŸ“ Difference between Central and Distributed Version Control Systems:

πŸ”Ή Central Version Control:

Central version control systems help to maintain the central versioning of code within a central place inside an organization. However, it comes with a risk if the central server went down, then you won't be able to share the code with others. Examples of a central version control system are SVN.

πŸ”Ή Distributed Version Control:

Distributed version control systems help to maintain the distributed versioning of code at different locations. So there is no risk of losing the source code, even if the central source code went down. In distributed version control systems, forking helps to maintain multiple copies of the main code at your level and work on it. At the end of the process, you can ask for a pull request (PR) to merge the changes back to the main central repository of the organization. Examples of distributed version control systems are Git & GitHub, Gitlab, and Bitbucket.

πŸ“ Difference between Git and GitHub:

πŸ”Ή Git:

Git is a local-level tool to manage our source code, and it's open source. Even we can build our own central version control system by launching an EC2 server and installing Git on it and managing the other system to sync our source code. Git has several crucial commands, including Git init, Git clone, Git status, Git add filename, Git commit -m "commit_message", Git push, Git pull, Git diff, Git fetch, Git merge, and Git logs.

⚜ Git Commands:

  1. git init: Initializes a new Git repository in the current directory. Example: git init.

  2. git clone: Copies an existing Git repository to your local machine. Example: git clone https://github.com/example/example.git.

  3. git status: Shows the current state of your Git repository, including any changes that have been made to your files. Example: git status.

  4. git add: Adds changes made to specific files to the staging area, preparing them for commit. Example: git add index.html.

  5. git commit: Saves changes made to the Git repository, along with a descriptive commit message. Example: git commit -m "Added new feature".

  6. git push: Uploads local changes to a remote Git repository. Example: git push origin master.

  7. git pull: Downloads changes from a remote Git repository to your local machine. Example: git pull origin master.

  8. git diff: Shows the differences between two versions of a file or between two branches. Example: git diff HEAD~1 HEAD.

  9. git fetch: Downloads changes from a remote Git repository without merging them with your local repository. Example: git fetch origin.

  10. git merge: Combines changes from one branch into another branch. Example: git merge feature-branch.

  11. git branch: Shows a list of all branches in the Git repository. Example: git branch.

  12. git checkout: Switches between different branches or commits in the Git repository. Example: git checkout feature-branch.

  13. git log: Shows a history of all commits made to the Git repository. Example: git log.

πŸ”Ή GitHub:

GitHub helps with usability, issue raising, commenting, reviewing, collaboration, project management, and CI/CD pipelines using GitHub Actions. With GitHub, you can easily collaborate with others, raise issues, communicate through commenting, review code changes, manage projects, and automate your CI/CD pipelines.

πŸ“ Conclusion:

In conclusion, version control is a crucial tool for managing and tracking changes made to a file or a set of files over time. It helps to maintain different versions of your codebase, collaborate with others, and keep track of changes made to your code. Central and distributed version control systems have their own advantages and disadvantages, and you can choose the one that fits your organization's requirements. Git and GitHub are popular tools for version control and collaboration, and they have unique features and functionalities.

More from this blog

D

DeployToCloud

405 posts

πŸ‘‹ Welcome to my Hashnode blog! I'm a DevOps Engineer with 2+ years of experience. Join ~5k followers and explore 320+ blogs on Python, AWS, Docker, Jenkins, Linux, and more. Let's connect & grow πŸš€