Contribute
First off, thanks for taking the time to contribute to tips-and-tricks
! All types of contributions are encouraged and valued.
If you want to contribute by writing your own post, this page is for you. Read the CONTRIBUTING.md guide for any other types of contribution (reporting bug, fixing typo, improving published post, etc.).
This blog is released with a Contributor Code of Conduct. By participating, you are expected to uphold this code.
Workflow
This blog is hosted on GitHub and we use the GitHub flow to collaborate on this project.
Proceed as follow to write and submit your own post:
- Fork this repository using the GitHub interface.
- Clone your fork by opening RStudio IDE and create a New Project from Version Control.
- Set up and write your post (see below Writing a post).
- Stage (
git add
) and commit (git commit
) your changes. - Push your changes to your GitHub fork.
- Submit a Pull Request on the original repo (see below Pull request).
We will then review your Pull Request as soon as possible.
For each post, a new git
branch will be created automatically and named as follow (in lower case): yyyy-mm-dd-title-of-the-post
. This will make easier the review process and the maintenance of this blog.
For example: 2024-05-07-working-with-git-branches
.
Requirements
Here is a list of the software required to contribute to this blog:
Software | Description | Website |
---|---|---|
R | The R environment | link |
RStudio Desktop | Integrated development environment (IDE) for R | link |
Quarto CLI | Scientific publishing system used for this blog | link |
Git | Version control software | link |
In addition:
- Install the packages
cli
,devtools
, andgert
. - Check your
git
configuration by reading this dedicated page.
Pull request
A Pull request is a proposal to merge a set of changes from one branch into another (GitHub documentation).
To submit your new post, you will create a Pull request (PR) to merge the branch 2024-05-07-working-with-git-branches
of your fork into the branch main
of the original repo.
First, send your local changes to your GitHub fork. On a terminal, run the following command to push your new branch:
## Send your new branch to GitHub (fork) ----
git push --set-upstream origin 2024-05-07-working-with-git-branches
Then create a new PR by visiting your GitHub fork homepage: you should see a new green button named Compare & Pull request (Fig. 1).
Add some information about your PR (Fig. 2):
- Check that you have selected the appropriate repos and branches (A).
- Add a title (B).
- Add a description (C). You can link this PR to an existing Issue.
Create a Draft Pull request (D): this will allow you to keep working on your post (i.e. adding commits). All new commits on the branch 2024-05-07-working-with-git-branches
will be automatically added to this PR.
Once your post is ready, click on Ready for review to finalize your PR (Fig. 3).
This will open a new PR and inform the blog maintainers that they can review your PR.
Your post will be merged (by the blog maintainer) into the main
branch and will be accessible a few minutes later here.