From e3ca9005a3c339434c4f95e76debe2b8126f65e1 Mon Sep 17 00:00:00 2001 From: Ashmit Singh Date: Sat, 22 Mar 2025 23:13:58 +0530 Subject: [PATCH 1/7] doc: init tutorial docs Signed-off-by: Ashmit Singh --- docs/tutorial/basics/version-control.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/tutorial/basics/version-control.md b/docs/tutorial/basics/version-control.md index e69de29..8f73736 100644 --- a/docs/tutorial/basics/version-control.md +++ b/docs/tutorial/basics/version-control.md @@ -0,0 +1 @@ +## What is Version Control ? \ No newline at end of file From c8eb66faa588dc6375c0453e70d77d81bc53923b Mon Sep 17 00:00:00 2001 From: Ashmit Singh Date: Tue, 25 Mar 2025 16:33:11 +0530 Subject: [PATCH 2/7] doc: update docs --- docs/tutorial/basics/version-control.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorial/basics/version-control.md b/docs/tutorial/basics/version-control.md index 8f73736..e08113b 100644 --- a/docs/tutorial/basics/version-control.md +++ b/docs/tutorial/basics/version-control.md @@ -1 +1 @@ -## What is Version Control ? \ No newline at end of file +## What is Version Control? \ No newline at end of file From 63d7c8810dc3641960c5e1106c71df073414d780 Mon Sep 17 00:00:00 2001 From: Ashmit Singh Date: Tue, 8 Apr 2025 16:18:36 +0530 Subject: [PATCH 3/7] doc: init version control tutorial Signed-off-by: Ashmit Singh --- docs/tutorial/basics/version-control.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/tutorial/basics/version-control.md b/docs/tutorial/basics/version-control.md index 902424f..d59469d 100644 --- a/docs/tutorial/basics/version-control.md +++ b/docs/tutorial/basics/version-control.md @@ -1 +1,11 @@ -## What is Version Control? +# Version Control System + +--- + +# πŸ“˜ Understanding Version Control System (VCS) + +Version Control Systems are essential tools for developers, enabling them to manage changes to source code over time. Whether you're working solo or with a team, VCS helps you track history, collaborate efficiently, and avoid costly mistakes. + +# 🧠 What is a Version Control System? + +Version Control Systems are essential tools for developers, enabling them to manage changes to source code over time. Whether you're working solo or with a team, VCS helps you track history, collaborate efficiently, and avoid costly mistakes. From 3b915086d3bc44aa9ca929bf8e4be7bf5b042b6d Mon Sep 17 00:00:00 2001 From: Ashmit Singh Date: Tue, 8 Apr 2025 16:19:34 +0530 Subject: [PATCH 4/7] doc: add key-features Signed-off-by: Ashmit Singh --- docs/tutorial/basics/version-control.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/tutorial/basics/version-control.md b/docs/tutorial/basics/version-control.md index d59469d..3b73127 100644 --- a/docs/tutorial/basics/version-control.md +++ b/docs/tutorial/basics/version-control.md @@ -9,3 +9,25 @@ Version Control Systems are essential tools for developers, enabling them to man # 🧠 What is a Version Control System? Version Control Systems are essential tools for developers, enabling them to manage changes to source code over time. Whether you're working solo or with a team, VCS helps you track history, collaborate efficiently, and avoid costly mistakes. + +### ✨ Key Features: + +- Tracks changes and revisions +- Allows collaboration +- Restores previous versions +- Branches and merges code +- Keeps a full history of development + +--- + +# 🧰 Types of Version Control Systems + +| Type | Description | Example Tools | +| --- | --- | --- | +| Local VCS | Stores version history in the local system only | RCS (Revision Control System) | +| Centralized VCS (CVCS) | All versions are stored in a central server. Needs constant connectivity. | SVN, CVS | +| Distributed VCS (DVCS) | Every developer has a full copy of the repository, allowing offline work. | Git, Mercurial | + +βœ… **Git** falls under Distributed VCS, which gives it speed, flexibility, and power. + +--- From dea648137409b69487b6d92c62ec0608b4b1f586 Mon Sep 17 00:00:00 2001 From: Ashmit Singh Date: Tue, 8 Apr 2025 16:21:15 +0530 Subject: [PATCH 5/7] doc: add more definitions Signed-off-by: Ashmit Singh --- docs/tutorial/basics/version-control.md | 45 +++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/docs/tutorial/basics/version-control.md b/docs/tutorial/basics/version-control.md index 3b73127..1f17d9e 100644 --- a/docs/tutorial/basics/version-control.md +++ b/docs/tutorial/basics/version-control.md @@ -31,3 +31,48 @@ Version Control Systems are essential tools for developers, enabling them to man βœ… **Git** falls under Distributed VCS, which gives it speed, flexibility, and power. --- + +# πŸ’‘ Why Use a Version Control System? + + Here are some reasons why VCS is essential for any development workflow: + +### Benefits: + +1. πŸ”„ **Track Changes** – Know who changed what and when. +2. πŸ› οΈ **Revert Mistakes** – Easily undo errors by switching to previous versions. +3. πŸ‘₯ **Collaboration** – Multiple people can work on the same project without overwriting each other’s code. +4. 🌳 **Branching and Merging** – Experiment with features without affecting the main codebase. +5. πŸ“œ **Documentation of Changes** – Every commit has a message explaining the change. + +--- + +# πŸ”„ How Does a Version Control System Work? + +VCS works by monitoring the changes in your files. Here's a simplified view of how VCS operates: + +| Step | Action | Description | +| --- | --- | --- | +| 1 | Modify Files | Edit, delete, or add files in your project. | +| 2 | Stage Changes | Add selected files to a staging area (in Git: `git add`). | +| 3 | Commit Changes | Save a snapshot of staged changes (in Git: `git commit`). | +| 4 | Push to Remote (DVCS) | Send commits to remote repository (e.g., GitHub). | +| 5 | Pull Latest Changes | Fetch updates from the remote repo to stay up-to-date. | + +--- + +# πŸ—οΈ Git: The Most Popular VCS + +Git is a free and open-source DVCS created by Linus Torvalds in 2005. + +## πŸ” Key Git Concepts: + +| Concept | Description | +| --- | --- | +| Repository | A directory where your project lives and Git tracks it | +| Commit | A snapshot of your project at a point in time | +| Branch | A parallel version of the repository. Used for new features or bug fixes | +| Merge | Combines changes from different branches | +| Clone | Copies an existing repo to your local machine | +| Push/Pull | Push = Upload commits; Pull = Download changes | + +--- From 7464f1820b4c9b6b752c9dc63a6cdb5609249fc0 Mon Sep 17 00:00:00 2001 From: Ashmit Singh Date: Tue, 8 Apr 2025 16:21:54 +0530 Subject: [PATCH 6/7] doc: add real-life-analogy Signed-off-by: Ashmit Singh --- docs/tutorial/basics/version-control.md | 30 +++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/docs/tutorial/basics/version-control.md b/docs/tutorial/basics/version-control.md index 1f17d9e..8a10199 100644 --- a/docs/tutorial/basics/version-control.md +++ b/docs/tutorial/basics/version-control.md @@ -76,3 +76,33 @@ Git is a free and open-source DVCS created by Linus Torvalds in 2005. | Push/Pull | Push = Upload commits; Pull = Download changes | --- +# πŸ“Œ Real-Life Analogy + +> Think of VCS like Google Docs version history. You can see who edited the file, restore previous versions, and collaborate in real-time. Git does this, but for code, and it's way more powerful. +> + +--- + +# πŸ“ˆ Centralized vs Distributed – Quick Comparison + +| Feature | Centralized VCS | Distributed VCS (Git) | +| --- | --- | --- | +| Server Dependency | High | Low | +| Work Offline | No | Yes | +| Speed | Slower | Faster | +| Risk of Data Loss | High (if server crashes) | Low (everyone has a copy) | +| Collaboration | Limited | Seamless | + +--- + +# βœ… Summary Checklist + +βœ”οΈ Version Control is essential for tracking and managing code + +βœ”οΈ Git is the most popular and powerful DVCS + +βœ”οΈ Helps teams collaborate and experiment safely + +βœ”οΈ Supports history, branches, merging, and backups + +--- \ No newline at end of file From d82ec348fd5e17a81f4f3630db67a1e3c063f64f Mon Sep 17 00:00:00 2001 From: Ayush Date: Tue, 8 Apr 2025 16:38:04 +0530 Subject: [PATCH 7/7] doc: use material-emojis Signed-off-by: Ayush --- .vscode/settings.json | 3 + docs/stylesheets/extra.css | 14 +++ docs/tutorial/basics/version-control.md | 114 ++++++++++++------------ 3 files changed, 74 insertions(+), 57 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index dbacf81..b3cf8ea 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -22,4 +22,7 @@ "editor.defaultFormatter": "esbenp.prettier-vscode", "editor.formatOnSave": true, }, + "[markdown]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, } \ No newline at end of file diff --git a/docs/stylesheets/extra.css b/docs/stylesheets/extra.css index aae7f74..5a0a374 100644 --- a/docs/stylesheets/extra.css +++ b/docs/stylesheets/extra.css @@ -32,4 +32,18 @@ /* hover effect for navigation */ .md-nav__link:hover { text-decoration: underline; +} + +/* Add vertical lines to tables */ +.md-typeset table:not([class]) { + border-collapse: collapse; +} + +.md-typeset table:not([class]) th { + border: 1px solid var(--md-typeset-table-color); + border-bottom: 1px solid var(--md-typeset-table-color); +} + +.md-typeset table:not([class]) td { + border: 1px solid var(--md-typeset-table-color); } \ No newline at end of file diff --git a/docs/tutorial/basics/version-control.md b/docs/tutorial/basics/version-control.md index 8a10199..5d77fc7 100644 --- a/docs/tutorial/basics/version-control.md +++ b/docs/tutorial/basics/version-control.md @@ -1,108 +1,108 @@ -# Version Control System +# :material-xml: Version Control System --- -# πŸ“˜ Understanding Version Control System (VCS) +## :material-book-open-page-variant: Understanding Version Control System (VCS) Version Control Systems are essential tools for developers, enabling them to manage changes to source code over time. Whether you're working solo or with a team, VCS helps you track history, collaborate efficiently, and avoid costly mistakes. -# 🧠 What is a Version Control System? +## :material-brain: What is a Version Control System? Version Control Systems are essential tools for developers, enabling them to manage changes to source code over time. Whether you're working solo or with a team, VCS helps you track history, collaborate efficiently, and avoid costly mistakes. -### ✨ Key Features: +### :material-creation: Key Features -- Tracks changes and revisions -- Allows collaboration -- Restores previous versions -- Branches and merges code -- Keeps a full history of development +- Tracks changes and revisions +- Allows collaboration +- Restores previous versions +- Branches and merges code +- Keeps a full history of development --- -# 🧰 Types of Version Control Systems +## :material-toolbox: Types of Version Control Systems -| Type | Description | Example Tools | -| --- | --- | --- | -| Local VCS | Stores version history in the local system only | RCS (Revision Control System) | -| Centralized VCS (CVCS) | All versions are stored in a central server. Needs constant connectivity. | SVN, CVS | -| Distributed VCS (DVCS) | Every developer has a full copy of the repository, allowing offline work. | Git, Mercurial | +| Type | Description | Example Tools | +| ---------------------- | ------------------------------------------------------------------------- | ----------------------------- | +| Local VCS | Stores version history in the local system only | RCS (Revision Control System) | +| Centralized VCS (CVCS) | All versions are stored in a central server. Needs constant connectivity. | SVN, CVS | +| Distributed VCS (DVCS) | Every developer has a full copy of the repository, allowing offline work. | Git, Mercurial | -βœ… **Git** falls under Distributed VCS, which gives it speed, flexibility, and power. +:material-check: **Git** falls under Distributed VCS, which gives it speed, flexibility, and power. --- -# πŸ’‘ Why Use a Version Control System? +## :material-lightbulb: Why Use a Version Control System? - Here are some reasons why VCS is essential for any development workflow: +Here are some reasons why VCS is essential for any development workflow: -### Benefits: +### Benefits -1. πŸ”„ **Track Changes** – Know who changed what and when. -2. πŸ› οΈ **Revert Mistakes** – Easily undo errors by switching to previous versions. -3. πŸ‘₯ **Collaboration** – Multiple people can work on the same project without overwriting each other’s code. -4. 🌳 **Branching and Merging** – Experiment with features without affecting the main codebase. -5. πŸ“œ **Documentation of Changes** – Every commit has a message explaining the change. +1. :material-sync: **Track Changes** – Know who changed what and when. +2. :material-wrench: **Revert Mistakes** – Easily undo errors by switching to previous versions. +3. :material-account-group: **Collaboration** – Multiple people can work on the same project without overwriting each other's code. +4. :material-source-branch: **Branching and Merging** – Experiment with features without affecting the main codebase. +5. :material-file-document: **Documentation of Changes** – Every commit has a message explaining the change. --- -# πŸ”„ How Does a Version Control System Work? +## :material-sync: How Does a Version Control System Work? VCS works by monitoring the changes in your files. Here's a simplified view of how VCS operates: -| Step | Action | Description | -| --- | --- | --- | -| 1 | Modify Files | Edit, delete, or add files in your project. | -| 2 | Stage Changes | Add selected files to a staging area (in Git: `git add`). | -| 3 | Commit Changes | Save a snapshot of staged changes (in Git: `git commit`). | -| 4 | Push to Remote (DVCS) | Send commits to remote repository (e.g., GitHub). | -| 5 | Pull Latest Changes | Fetch updates from the remote repo to stay up-to-date. | +| Step | Action | Description | +| ---- | --------------------- | --------------------------------------------------------- | +| 1 | Modify Files | Edit, delete, or add files in your project. | +| 2 | Stage Changes | Add selected files to a staging area (in Git: `git add`). | +| 3 | Commit Changes | Save a snapshot of staged changes (in Git: `git commit`). | +| 4 | Push to Remote (DVCS) | Send commits to remote repository (e.g., GitHub). | +| 5 | Pull Latest Changes | Fetch updates from the remote repo to stay up-to-date. | --- -# πŸ—οΈ Git: The Most Popular VCS +## :material-git: Git: The Most Popular VCS Git is a free and open-source DVCS created by Linus Torvalds in 2005. -## πŸ” Key Git Concepts: +## :material-magnify: Key Git Concepts: -| Concept | Description | -| --- | --- | -| Repository | A directory where your project lives and Git tracks it | -| Commit | A snapshot of your project at a point in time | -| Branch | A parallel version of the repository. Used for new features or bug fixes | -| Merge | Combines changes from different branches | -| Clone | Copies an existing repo to your local machine | -| Push/Pull | Push = Upload commits; Pull = Download changes | +| Concept | Description | +| ---------- | ------------------------------------------------------------------------ | +| Repository | A directory where your project lives and Git tracks it | +| Commit | A snapshot of your project at a point in time | +| Branch | A parallel version of the repository. Used for new features or bug fixes | +| Merge | Combines changes from different branches | +| Clone | Copies an existing repo to your local machine | +| Push/Pull | Push = Upload commits; Pull = Download changes | --- -# πŸ“Œ Real-Life Analogy + +## :material-pin: Real-Life Analogy > Think of VCS like Google Docs version history. You can see who edited the file, restore previous versions, and collaborate in real-time. Git does this, but for code, and it's way more powerful. -> --- -# πŸ“ˆ Centralized vs Distributed – Quick Comparison +## :material-chart-line: Centralized vs Distributed – Quick Comparison -| Feature | Centralized VCS | Distributed VCS (Git) | -| --- | --- | --- | -| Server Dependency | High | Low | -| Work Offline | No | Yes | -| Speed | Slower | Faster | +| Feature | Centralized VCS | Distributed VCS (Git) | +| ----------------- | ------------------------ | ------------------------- | +| Server Dependency | High | Low | +| Work Offline | No | Yes | +| Speed | Slower | Faster | | Risk of Data Loss | High (if server crashes) | Low (everyone has a copy) | -| Collaboration | Limited | Seamless | +| Collaboration | Limited | Seamless | --- -# βœ… Summary Checklist +## :material-check-all: Summary Checklist -βœ”οΈ Version Control is essential for tracking and managing code +:material-check: Version Control is essential for tracking and managing code -βœ”οΈ Git is the most popular and powerful DVCS +:material-check: Git is the most popular and powerful DVCS -βœ”οΈ Helps teams collaborate and experiment safely +:material-check: Helps teams collaborate and experiment safely -βœ”οΈ Supports history, branches, merging, and backups +:material-check: Supports history, branches, merging, and backups ---- \ No newline at end of file +---