Skip to content

Commit

Permalink
Introduces a contributor's guide
Browse files Browse the repository at this point in the history
I took notes for every step I took to make my
[first contribution](artificialwisdomai/sdac#8) to XertAI.
Then, I used those notes to create this contributor's guide, after referencing
other CONTRIBUTING.md files. :)

Resolves artificialwisdomai/sdac#7
  • Loading branch information
lsdake committed Jan 12, 2023
1 parent d4dcd4d commit e51c20f
Showing 1 changed file with 99 additions and 0 deletions.
99 changes: 99 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# Contributing to xertai

So, you want to build the next generation of machine learning tools within XertAI? Yay!

Everybody is treated equally and must follow this process in order to contribute to the project blablabla

- [Code of Conduct](#code-of-conduct)
- [Contributor License Agreements](#contributor-license-agreements)
- [Setting up your Environment to Contribute to XertAI] (#Setting-up-your-Environment-to-Contribute-to-XertAI)
- [Making a Pull Request (PR) Contribution to XertAI] (#Making-a-Pull-Request-(PR)-Contribution-to-XertAI)

# Code of conduct

All members of the XertAI community must abide by the [Code of Conduct](CODE-OF-CONDUCT.md).

# Contributor license agreements

We'd love to accept your contributions! But before we can merge your pull request, you will have to approve the [Computelify CLA](CLA.md).

Once you submit a pull request, you will be prompted to approve the CLA. This is necessary because you own the copyright to your changes, even
after your contribution becomes part of this project. So this agreement simply gives Computelify permission to use and redistribute your
contributions as part of the project.

# Setting up your Environment to Contribute to XertAI

## If you do not have an SSH public key, create one:

```bash
lsdake@beast-05:~$ ssh-keygen -key ed25519
(...)
```

## Register ssh key to github land
todo

## Create a folder to contain repositories

```bash
lsdake@beast-05:~$ mkdir repos
lsdake@beast-05:~$ cd repos
```

## Clones the repository from your github profile, making a local copy on the machine

```bash
lsdake@beast-05:~$ git clone [email protected]:lsdake/SDAC.git
(...)
```

## Creates a reference to the source of truth
```bash
lsdake@beast-05:~/repos/SDAC$ git remote add upstream https://github.com/xertai/SDAC.git
```

# Making a Pull Request (PR) Contribution to XertAI

This is how you submit improvements to the code that you've made, after executing ^^^ all that
Some of these commands are "git magic": just roll with it :). They should be done each time you make a contribution!

## Create a branch to make our improvements

```bash
lsdake@beast-05:~/repos/SDAC$ git checkout -b [BRANCHNAME]
```

## Make your improvements to the thingy wingy

Make your changes to any file you want to modify

```bash
lsdake@beast-05:~/repos/SDAC$ git commit .
```

## Retrieves a copy of the references to the source of truth

This updates our local references to the upstream

```bash
lsdake@beast-05:~/repos/SDAC$ git fetch upstream
(...)
```

## Updates the local copy of the repository with the retrieved copy of the references from the source of truth

```bash
lsdake@beast-05:~/repos/SDAC$ git rebase upstream/main
Successfully rebased and updated refs/heads/main.
```

## This pushes our local copy that's synced with the SoT to our personal fork of the SoT

(Warning triangle emoji) With XertAI's workflow, we protect the main branch of the repository so this is always a safe operation from the project's perspective. It may end up damaging your local copy on github, so be careful!

```bash
lsdake@beast-05:~/repos/SDAC$ git push -f
Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
To github.com:lsdake/SDAC.git
eae357c..adade0e main -> main
```

0 comments on commit e51c20f

Please sign in to comment.