Skip to content

TekFunda

Let’s Start From Basics

What is Git ?

Posted on January 12, 2025 By admin No Comments on What is Git ?

Git is a distributed version control system (VCS) that helps developers track changes to their code, collaborate with others, and manage different versions of their projects. It was created by Linus Torvalds in 2005 to help with the development of the Linux kernel. Since then, it has become one of the most widely used version control systems in the world.

Key Features of Git:

  1. Distributed System: Every developer has a full copy of the repository, including its history. This makes it possible to work offline, and each contributor can make changes locally before pushing them to a central server.
  2. Version History: Git records all changes made to a project, which allows developers to go back to previous versions of the code, compare differences, and roll back changes if needed.
  3. Branching and Merging: Git allows you to create branches to work on new features or bug fixes without affecting the main codebase. Once the work is done, these branches can be merged back into the main project. This makes parallel development easier.
  4. Collaboration: Git makes collaboration easy by allowing multiple developers to work on the same project simultaneously. It tracks who made what changes and when, and it can handle merging changes from different team members.
  5. Efficiency: Git is designed to be fast and efficient, even for large projects. It only stores the changes made (deltas) instead of duplicating entire files, which helps keep the repository’s size manageable.
  6. Staging Area: Before committing changes to the repository, Git uses a staging area where you can prepare and review changes. This lets you commit only the changes you intend to, rather than everything you’ve modified.

Common Git Commands:

  • git init: Initializes a new Git repository.
  • git clone [url]: Clones an existing repository from a remote location.
  • git add [file]: Stages changes to be committed.
  • git commit -m "message": Commits the staged changes with a message.
  • git status: Shows the current status of the working directory and staging area.
  • git push: Pushes local commits to a remote repository.
  • git pull: Fetches changes from a remote repository and merges them into your local branch.
  • git branch: Lists, creates, or deletes branches.
  • git merge [branch]: Merges another branch into the current branch.

Workflow:

A typical Git workflow includes:

  1. Clone a repository.
  2. Create a branch for the feature or bug fix you are working on.
  3. Add and commit changes locally.
  4. Push changes to a remote repository.
  5. Use pull requests (or merge requests) to propose changes for review and merging into the main codebase.

Git has become the backbone of collaborative software development, with platforms like GitHub, GitLab, and Bitbucket providing remote hosting services and additional tools to facilitate teamwork and code review.

GIT Tags:DevOps, Git, QA, SRE, Subversion, Version Control

Post navigation

Previous Post: What is various types of testing web API?
Next Post: Installing Robot test automation framework on VS Code IDE

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Archives

  • January 2025
  • December 2024

Categories

  • GIT
  • QA Testing

Recent Posts

  • Installing Robot test automation framework on VS Code IDE
  • What is Git ?
  • What is various types of testing web API?
  • What is version control?

Recent Comments

No comments to show.

Copyright © 2025 TekFunda.

Powered by PressBook WordPress theme