-
Browse to https://github.com/hyperledger-labs/hyperledger-labs.github.io
-
Click the fork button
-
Clone the repository to your machine using:
git clone https://github.com/username/hyperledger-labs.github.io
, replacingusername
with your Github username. -
Change to the
hyperledger-labs.github.io
directory -
Verify that git is configured properly. Specifically, make sure that your name and email in your local machine settings match the name and email associated with your Github profile.
git config user.email git config user.name
If the values do not match your Github profile, you can set them with the following, replacing
[email protected]
andMona Lisa
with the values that match your Github profile. NOTE: This will only change the configuration for thehyperledger-labs.github.io
repository. If you want to change it for all repositories, usegit config --global
instead.git config user.email "[email protected]" git config user.name "Mona Lisa"
-
Create a branch for you work using
git checkout -b branch-name
, replacingbranch-name
with a name to reflect the lab that you are proposing. For example, if you are adding a lab namedfoo
, you might name your branchlab_foo
. -
Copy the
proposal-template.md
to thelabs
directory under a name matching the lab. Let's continue with the idea that you are creating a lab namedfoo
. This is the command that you would use:cp proposal-template.md labs/foo.md
-
Edit the newly created file in your favorite editor filling out the information that is requested in the template.
-
Once you have fully completed the newly created lab proposal, then commit the source code using the following.
IT IS IMPORTANT TO INCLUDE THE
-s
OPTION TO SIGN YOUR COMMIT.git add . git commit -s -m "Adding new lab <lab-name>"
NOTE: Replace
<lab-name>
with the name of your new lab. -
Optional: If you performed multiple commits on your local branch, you can squash these commits using
git rebase -i HEAD~<# of commits>
. For example, to squash four commits into one, do the following:git rebase -i HEAD~4
In the text editor that comes up, keep the word
pick
for the first commit and replace the wordspick
withsquash
next to all other commits. Save and close the editor, and git will combine the "squash"'ed commits with the one before it. Git will then give you the opportunity to change your commit message to something like, "Issue #100: Fixed retweet bug." Make sure that your commit message also contains the DCO sign-off line.Important: If you've already pushed commits to GitHub, and then squash them locally, you will have to force the push to your branch.
git push origin branch-name --force
Helpful hint: Before doing a push, you can always edit your last commit message, before pushing, by using:
git commit --amend -s
The
-s
option will add the necessary line for the DCO sign-off. -
Push your changes, replacing
branch-name
with the branch name that you created above.git push origin branch-name
-
Create a new pull request by visiting
https://github.com/username/hyperledger-labs.github.io
, replacingusername
with your Github username. Click the "New Pull Request" button. -
Verify that the pull request contains your commits and that all commits are signed off prior to creating the pull request. If all commits are not signed off, the lab will be rejected. Please revisit steps 9-11 if you have any commits that are not signed off.
Last active
December 10, 2020 16:14
-
-
Save tkuhrt/2cb6ae09fa6c122674766d2bb9239cdb to your computer and use it in GitHub Desktop.
Steps to contribute a new lab proposal to Hyperledger Labs
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment