Contributing Code

From PMDOWiki
Revision as of 03:22, 5 May 2023 by IDK (talk | contribs)

PMDO is open source with the MIT license. It means that anyone is allowed to use, redistribute, and modify the software among other things. When you push to github you provide code under the same license.

To contribute to PMDO, you will need to create a Pull Request of your code. In order to do that, you need to push a branch to a fork of the original repo. And in order to do that, you need to have a branch, and have a fork.

First, let's create our own branch. If you have already made edits to PMDO on your local copy by following the Debugging tutorial, you will need to create a new branch of your work and commit to it.

git checkout -b my_branch
git add .
git commit -m"commit message"

Then, you will need to fork the repo you are making changes to from github's UI:

<Image of the fork button on github's UI>

In this case, we are forking RogueEssence, but if your changes have affected other repos such as PMDODump or PMDC, you will need to fork them separately as well.

You now have a fork of the repo under your account- in other words, a new remote. You need to add this remote as a part of your git setup.

git remote add my_remote_name https://github.com/my_user_name/RogueEssence.git

Then push your branch to this repo.

git push my_remote_name

It should now appear as a branch in your repository.

<Image of the branch>

Next, create a pull request from this branch. Github makes it easy with a single button:

<Image of the PullRequest button>

The pull request is now added. Now you will just need to wait until the code gets reviewed, and the branch will either be merged into the main repo or you will be asked for changes.