<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/how-git-works-ottclpno0" -->

---
title: How Git Works | daily.dev
description: Git is a distributed version control system that helps track changes in code and collaborate with others. Learn how to initialize a Git repository, add files,...
canonical: https://daily.dev/posts/how-git-works-ottclpno0
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: How Git Works | daily.dev
og:description: Git is a distributed version control system that helps track changes in code and collaborate with others. Learn how to initialize a Git repository, add files,...
og:url: https://daily.dev/posts/how-git-works-ottclpno0
og:image: https://api.daily.dev/og/posts/otTCLpNo0.png
og:image:alt: How Git Works
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How Git Works

**[Substack](https://daily.dev/sources/substack)** · 2 min read · 95 upvotes · 1 comments

## Summary

Git is a distributed version control system that helps track changes in code and collaborate with others. Learn how to initialize a Git repository, add files, commit changes, switch branches, merge changes, and more.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blog.amigoscode.com/p/how-git-works>

## Community discussion

Top comments from developers on daily.dev.

**@kolajeanphilippeaganh** · 1 upvotes

> good article

---

Tags: [#general-programming](https://daily.dev/tags/general-programming), [#git](https://daily.dev/tags/git), [#version-control](https://daily.dev/tags/version-control)

[View this post on daily.dev](https://daily.dev/posts/how-git-works-ottclpno0)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"How Git Works","url":"https://daily.dev/posts/how-git-works-ottclpno0","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/how-git-works-ottclpno0"},"datePublished":"2024-01-16T01:10:01.967Z","dateModified":"2024-01-16T01:10:00.310Z","description":"Git is a distributed version control system that helps track changes in code and collaborate with others. Learn how to initialize a Git repository, add files,...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/862034a2a4863c5f538e06cec830255f?_a=AQAEufR","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/862034a2a4863c5f538e06cec830255f?_a=AQAEufR","isAccessibleForFree":true,"articleSection":"Substack","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Substack","logo":"https://media.daily.dev/image/upload/s--KFqxX_OL--/f_auto,t_logo/v1698154293/logos/substack.jpg","url":"https://daily.dev/sources/substack"},"commentCount":1,"discussionUrl":"https://daily.dev/posts/how-git-works-ottclpno0","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":95},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":1}],"keywords":"general-programming,git,version-control","timeRequired":"PT2M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Substack","item":"https://daily.dev/sources/substack"},{"@type":"ListItem","position":3,"name":"How Git Works"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/how-git-works-ottclpno0","comment":[{"@type":"Comment","text":"good article","datePublished":"2024-02-05T21:26:23.094Z","url":"https://daily.dev/posts/otTCLpNo0#c-LkEY4wHVY","author":{"@type":"Person","name":"kola jean philippe aganh","url":"https://daily.dev/kolajeanphilippeaganh","image":"https://lh3.googleusercontent.com/a/ACg8ocKUnuM45Pgm6unX36UluF461q2pvg6yNyGaNaKS2-nDIA=s96-c"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}}]}
```

