Github is normally used as tool for helping us to code but it might also be used to share your cooking recipes or any other kind of file that could be done in collaboration with a large community that wish to add something to the original work for its enrichment.
In this post I'll show you how to do it in 3 simple steps.
- Create your recipe
- Edit your recipe
- Accept contributions
Step 1. Create your recipe
We'll store our recipe in a repository. To do so, go to your github's dashboard, find the + and select new repository.
Note: In simple words, a repository or repo represent A project you are working on. You will typically want to create a repo for every project.
In order to create your repo, you will need to name it. Just select the name and hit the Create repository green button. I named my recipe Easy Omelette and left the other fields of the form as is. This will create the repo publicly accessible through http://github.com/Turupawn/Easy-Omelette following the http://github.com/USERNAME/REPO-NAME url formation.
Step 2. Edit your recipe
Now that we have an empty Git repo, let's add our first file. Just click on the Readme link and this will create a file named Readme.md. It has the .md extension because it will follow the Markdown sintanx so it's easier to format (Read below).
This will open a text editor where you can edit your file. This time we are going to edit it using the markdown format to make it look pretty. Markdown is a Markup language just like HTML. It help us easily formatting our documents so they look pretty (with images, headers, tables etc...). If you haven't already, you should check some Markdown documentation.
Once you finished writing your recipe, click the green Commit new file button. This will Save your document.
Note: In simple words, a making a commit is Saving the files of a repo.
That's it! The file is now live. As you can see, Github formatted the headers and lists following the markdown syntax because we added the .md extension.
You can edit or create more files, but remember. The file named Readme will always be displayed in the homepage.
Step 3. Accept Contributions
As the creator of a Github project you can receive contributions from total strangers. But you have to approve those contributions to make it part of your repo. Let do that now.
Now Github user Serpel want's to improve my recipe (btw he's not a total stranger, he's a friend of mine). The first thing he needs to do is to Fork my project by clicking in the Fork button.
Note: In simple words, a fork is a Copy of a repo.
Now Serpel can edit his copy of my recipe without messing mine. He can edit his copy on http://github.com/Serpel/Easy-Omelette just like we did it on Step 2.
Once he's happy with his new version, he can create a Pull request.
Note: In simple words, a pull request or PR is a Change proposal.
Now I, as the repo creator can easily review the changes, comment and finally Merge the pull request.
Note: In simple words, doing a merge is Combining two versions of a repo.
Now the changes are live on the original repo. The recipe just got improved in collaboration!
I think Git might be a little intimidating at first but so far it's the best way to handle collaborative projects I've seen. I like that we can do a lot of stuff from Github's web without needing a command line, this lowers the entry barriers for newcomers.
Thanks for reading!