Git is a version control system that allows you to track changes in your code, collaborate with team members, and manage your Assistant Extensions efficiently. If you're new to Git, this guide will introduce you to the basic concepts of using Git with Assistant Extensions. We'll also show you how to work with Git in Visual Studio Code, a popular code editor for extension development.
Git is a distributed version control system that helps you track changes in your code, collaborate with others, and maintain a history of your work. With Git, you can create "commits" to save snapshots of your code at different points in time.
A Git repository, often referred to as a "repo," is a directory or storage space where your project's history and source code are stored. It contains all the files, commits, and configuration settings related to your project.
Git follows a specific workflow. Some key concepts to understand include:
Commit: A commit is a snapshot of your project at a specific point in time. You create commits to save your work.
Branches: Branches are separate lines of development. You can create branches to work on features or bug fixes without affecting the main codebase.
Pull Requests: When you're ready to merge your changes into the main codebase, you can create a pull request (PR) for review.
COWI's default Git platform is Gitea, accessible at Gitea on cowiportal. This documentation focuses on using Gitea for managing Assistant Extensions, but you can adapt these principles for other Git services.
Begin by creating a repository in Gitea with the same name as your extension ID. You can create this repository in your personal area or within any organization you belong to. Here's a visual guide for creating a Gitea repository:

If your project isn't already a Git repository, initialize it by running the following commands in the integrated terminal of Visual Studio Code:
git init
git add .
git commit -m "First commit"
To link your local repository to the Gitea remote repository, copy the provided line from your empty Gitea repository and paste it into the integrated terminal of Visual Studio Code
git remote add origin http://git.cowiportal.com/{owner}/{extensionId}.git
git push -u origin master

To dive deeper into using Git with Visual Studio Code, you can explore the official documentation: Using Git source control in VS Code. This documentation provides in-depth information on Git integration within VS Code and offers valuable insights into Git workflows.
Remember that Git is a powerful tool that can greatly enhance your workflow when developing Assistant Extensions. Whether you're working solo or as part of a team, Git's version control capabilities can help you track, collaborate, and manage your projects effectively.