From 3b565c0bdb9b57daf0910f9641d4c2b17cf615a5 Mon Sep 17 00:00:00 2001 From: sashaastiadi Date: Mon, 28 Oct 2024 17:11:58 +0000 Subject: [PATCH] Add # Version Control and Git Workflow --- %23-Version-Control-and-Git-Workflow.md | 71 +++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 %23-Version-Control-and-Git-Workflow.md diff --git a/%23-Version-Control-and-Git-Workflow.md b/%23-Version-Control-and-Git-Workflow.md new file mode 100644 index 0000000..848d3a6 --- /dev/null +++ b/%23-Version-Control-and-Git-Workflow.md @@ -0,0 +1,71 @@ +# Version Control and Git Workflow + +Version control is essential for managing changes to your website's code and content. Using Git allows multiple team members to collaborate effectively, track changes, and maintain the integrity of your projects. This guide outlines the key steps to manage repositories using Git within the ThreeFold ecosystem. + +## Cloning a Repository + +To start working on a project, you'll first need to clone the repository to your local machine. This allows you to create your own copy of the project to work on. +Read + +### Steps to Clone a Repository + +Open your Terminal (Command Prompt or Git Bash). +Navigate to your desired directory where you want to clone the repository using the cd command. For example: + + ```bash +cd path/to/your/directory +Clone the Repository: Use the following command to clone the repository: + + ```bash +Copy code +git clone https://git.ourworld.tf/your_repo_url.git +Navigate into the Cloned Repository: + +bash +Copy code +cd your_repo_name + +For detailed Git commands and workflows, check out the [Github guide](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository) + +### Open Your Code Editor + +To edit your files, you'll need a code editor. A popular choice is Visual Studio Code (VS Code). + +#### Download VS Code + +You can download Visual Studio Code from the official website: [Download VS Code](https://code.visualstudio.com/). + +### Finding Content + +Once you have your code editor open, navigate to the folder where your content is stored. Typically, you’ll find the content in the `src` or `content` folder of your project. + +#### Steps to Find Content + +1. **Open the Project in VS Code**: + - Use the “File” menu and select “Open Folder…” to locate and open your cloned project. + +2. **Explore the Folder Structure**: + - Look for the `src` or `content` folder, which contains the files you need to edit. + +### Making Changes + +Now that you've found the content you want to edit, you can make your changes. + +#### Steps to Save Your Changes + +1. **Edit the Files**: + - Make the necessary changes in your code or content files. + +2. **Save Your Changes**: + - Use `Ctrl + S` (or `Cmd + S` on Mac) to save your changes in VS Code. + +### Using Branches + +Before pushing your changes to the main repository, it’s essential to work on a separate branch to keep the development process organized and collaborative. + +#### Steps for Branching + +1. **Create a New Branch**: + Always create a new branch from the `development` branch before making changes. Use the following command: + ```bash + git checkout -b your_branch_name