Contributing to the SDF with Github

This article will show you how to use Git and Github to fork an SDF github repo, and create a pull request to submit work to the SDF.

You would do this process if you were working on one of the bounties found here

Sign up for github

  1. Enter the website https://github.com
  2. Register your account (if you have account you can omit this step)

    alt text

  3. Sign in to your account
    • click Sign in button

      alt text

    • write your username and password

      alt text

Install git

  1. Download git (version depends on your OS)
  2. Install downloaded file git
  3. Before fork or clone repository you must set up your git. Here is a good explanation (Setting up Git chapter and the three steps below)

Fork an SDF repo

  1. Navigate to the SDF repository
  2. Click repository StratisDevelopmentFoundation.github.io
  3. Find Fork button and click it

    alt text

    You have just forked the repository into your account

Clone the repo locally

  1. Navigate to your fork, should be like this https://github.com/YOUR-USERNAME/StratisDevelopmentFoundation.github.io
  2. Under the repository name, click Clone or download and copy address (button in blue rectangle)

    alt text

  3. You can clone repository by HTTPS or SSH protocol (if you prefer second option, you must first generate SSH keys)
  4. Open Git Bash
  5. Move to your folder with local repository (use cd .., cd, ls, pwd command)
  6. Use git clone git@github.com:YOUR-USERNAME/StratisDevelopmentFoundation.github.io.git alt text

Modify the repo locally

Before you start you must create your own local branch:

  1. Open Git Bash
  2. Move to folder ../StratisDevelopmentFoundation.github.io on your computer (use cd .., cd, ls, pwd command)
  3. Use git checkout -b “name_of_your_new_branch” (you can check your current branch with git branch)

    alt text

    alt text

  4. You can make changes on your repository locally right now. When you finished you can commit your changes. The below steps describe how

Commit changes to your github fork

  1. Open Git Bash
  2. Use git status. You can see the result of your changes

    alt text

  3. Use git add -A

    alt text

  4. Use git commit -m “commit_name”

    alt text

  5. Use git push origin “name_of_your_new_branch”

    alt text

Create a pull request to the original SDF repo

  1. Enter into your account on https://github.com
  2. Select repository StratisDevelopmentFoundation.github.io
  3. Click New pull request button

    alt text

  4. Select your own branch for comparison with base: master SDF repository

    alt text

  5. Click Create Pull Request button

    alt text

From now you contribute to Software Development Foundation project!

Article written by @LukasDev (can be contacted on our Discord) Tip @LukasDev with Stratis here

Categories:

Updated: