This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
Collaboration and Git Workflow
In the ThreeFold web repository, if you’re not the repo owner, follow this collaboration guide to ensure smooth contributions. This guide assumes a basic understanding of Git for cloning, editing, committing, and merging. If you're new to Git, refer to the official GitHub guides for more information.
Key Principles for Working with Branches
We work with branches in Git, which are isolated environments within a repository. Branching allows you to make changes without affecting the main codebase. When your changes are complete and reviewed, they are merged back into the main branch.
Basic Workflow for Collaborating on the Repository
Step 1: Clone the Repository
Open Terminal or Command Prompt.
Navigate to your directory where you want to clone the repository:
cd path/to/your/directory
Clone the Repository:
git clone https://git.ourworld.tf/your_repo_url.git
Enter the Cloned Repository:
cd your_repo_name
For more on cloning, refer to the GitHub guide on cloning a repository.
Step 2: Open in a Code Editor
A preferred code editor, like Visual Studio Code (VS Code), is useful for editing files.
Download VS Code: Download here.
Open your cloned project:
In VS Code, use the “File” menu and select “Open Folder…” to locate and open your project.
Step 3: Create a New Branch
Always make changes on a new branch to keep the development process organized.
Create a Branch from development:
git checkout -b your_branch_name development
Step 4: Make Edits and Commit Changes
Edit Files: Make necessary changes in your branch.
Save Changes: In VS Code, use Ctrl + S (or Cmd + S on Mac) to save.
Stage and Commit:
git add .
git commit -m "Descriptive commit message"
###Step 5: Push Changes and Create a Pull Request
Push your branch:
git push origin your_branch_name
Create a Pull Request: Go to https://git.ourworld.tf/thereponame and create a pull request from your branch to the development branch.
Request a Merge: Notify the web presence admin to review and merge your changes. Do not merge them yourself.
Important Don’ts
Do not commit directly to the development or main branches