In two ways:
- As a Creator
- As a Learner
A creator can add a new MicroByte by choosing a topic from here - MicroByte Topics, or can create a topic of their own and choose a respective master repo for the same. Creators must follow the MicroByte Structure as mentioned in the getting started guide.
A learner can help creators improve the MicroBytes by adding new functionality, fixing bugs, enhancing the learning content or adding better references.
There are no restrictions on the roles, any participants can make PRs either as a Creator, a Learner or Both.
Kindly refer the aforementioned getting started guide for detailed instructions.
Kindly utilise the templates provided in the .github
directory of the main branch to create relative issues and PRs. You can also go adventurous if you have something fun in your mind, but kindly maintain a similar workflow by taking the already available templates as a reference.
For working on a brand new MicroByte, utilise the issue template Add MicroByte
using the GitHub UI.
For updating a MicroByte in stock, utilise the issue template Update MicroByte
using the GitHub UI.
For proposing a PR with a new MicroByte, utilise PR template adding-microbyte.md
using GitHub API.
For proposing a PR with updates to an existing MicroByte, utilise PR template updating-microbyte.md
using GitHub API.
</> Git Workflow </>
## It all starts with forking the repository
## Clone the repo
$ git clone https://github.com/<User-Name>/<Repo-Name>.git
# - OR -
$ git clone git@github.com:<User-Name>/<Repo-Name>.git
## Add upstream remote
$ git remote add upstream https://github.com/Crio-Bytes/DSA.git
# - OR -
$ git remote add upstream git@github.com:Crio-Bytes/DSA.git
## Syncing with upstream/main branch
$ git fetch upstream
$ git checkout main
$ git merge upstream/main
## To create and shift to working branch
$ git checkout -b <name>/<microbyte-name|issue>/{<add|update|additional-fixes>}
## Types of additional-fixes:
# wip - Work in Progress; long term work; mainstream changes
# feat - New Feature; future planned; non-mainstream changes
# bug - Bug Fixes
# exp - Experimental; random experiemntal features
## Ensure branch
$ git branch
## Wildcard to add all folder and file changes in current branch
$ git add --all .
# Committing all changes with appropriate commit message and description
$ git commit -m "your-commit-message" -m "your-commit-description"
## To publish working branch to your forked repository
$ git push origin <branch-name>
## Creating the PR using GitHub UI
# Create Pull Request from the working branch in your forked repository to the master branch in the upstream repository
# Link Pull Request to appropriate Issue, or Project+Milestone (if no issue created)
# IMPORTANT: Do Not Merge the PR unless specifically asked to by an admin or approved by at least 2-3 maintainers.
# NOTE: Contributors who are among maintainers and/or collaborators have merge permissions.
</> After PR Merge/Close </>
## Syncing with upstream/main branch
$ git fetch upstream
$ git checkout main
$ git merge upstream/main
## Deleting the branch in local repository
# If PR is merged
$ git branch -d <branch-name>
# If PR is closed/rejected
$ git branch -D <branch-name>
## Deleting the branch in remote repository
$ git push origin --delete <branch-name>