Fork and contribute to the API
Fork and clone
GitHub Desktop provides a user-friendly way to collaborate on open-source projects without needing to use complex command-line commands. Here’s a step-by-step guide to contribute to an open-source project using GitHub Desktop, along with visual references from the images provided.
-
Fork the Repository
Navigate to femdesign-api repository and click on Fork.
Forking creates a copy of the repository in your GitHub account where you can make changes. From the second image:
Select your account and give the forked repository a name (you can use the default). Click Create Fork.
-
Clone Your Fork Using GitHub Desktop
Once your fork is ready ,go to your forked repository on GitHub, click the green Code button, and choose Open with GitHub Desktop.
If GitHub Desktop isn’t installed, you’ll be prompted to download it.
Select a folder on your local computer where the repository will be cloned.Your repository is now ready for editing on your local machine.
-
Create a New Branch for Your Changes
To avoid changing the main branch directly, create a new branch.
In GitHub Desktop, go to the top bar and click Current Branch. Select New Branch, give it a descriptive name (e.g., update-material-docs), and click Create Branch.
Now you’re ready to make changes.
-
Make Changes to the Project
Open the
.sln
file within the cloned repository folder in your preferred code editor (Visual studio is the recommended for this project). Edit the files or add new features. -
Commit Your Changes Locally
Return to GitHub Desktop, where you’ll see a summary of your changes under the Changes tab. Write a short, descriptive message about what you’ve done in the Summary field (e.g., “Updated Material.cs to fix bug”). Click
Commit
and thenpush
.This saves your changes locally in your branch and uploads your changes from your local branch to the corresponding branch on your forked repository in GitHub.
-
Create a Pull Request
On GitHub, navigate to your forked repository and click the
contribute -> open pull request
.Fill the information in the pull request template, including a title and description of your changes.
Reference the Development branch
If our API is missing certain functionality needed for your project, you may require additional support or development from our team. In such cases, using the development branch is highly beneficial, as it contains the most up-to-date version of the API. This allows you to access new methods and implementations before their official release. To do so, you can switch to the Dev branch (typically identifiable by a _Dev suffix) and reference the API from there.
Instead of referencing the API through NuGet in your project, you can link it directly via the .csproj file. This approach ensures that when you update or fetch the API repository, your project will automatically incorporate the latest version.
I hope this guide was helpful. If you have any questions, feel free to send a message to the community page.