Modified from here (thanks to Kelly Sovacool!)
We use the Gitflow workflow to make our lives easier.
This means all edits should be made in separate branches -- not the master
branch.
Only the project maintainer will make edits or merge on master
.
View the open issues to see the To-Do list. If an issue isn't assigned to anyone, we would welcome your contribution!
If you need a refresher on Git or GitHub, see: - Software Carpentry's lesson: Version Control with Git - Hadley Wickham's chapter on Git and GitHub in his book R Packages
From the terminal, either clone
or fork
this repo from wherever you want on your computer (e.g. Desktop
, Documents
, etc.).
clone if you have write access:
git clone https://github.com/zenalapp/matchathon
fork if you do not have write access by pressing the Fork button on GitHub, then clone your fork.
Move to the repo directory.
cd matchathon
Create a new branch for your feature.
Give it a short, descriptive name.
git checkout -b feature-branch-name
The branch name should reflect the bug or feature it will resolve,
or reference the issue number directly (examples).
[Note: wherever you see feature-branch-name
in these instructions,
replace that with your branch's actual name.]
Make your edits.
Add & commit changes.
git add filename.R
git commit -m "Implement cool feature XX (Resolves #Y)"
Use this style guide for writing good commit messages.
The highlights:
In the merge commit message, reference any issues
(our To-Do list) that the pull request resolves so the issue is closed automatically.
For example, the commit
message Kelly wrote when originally writing this file was Add contributing instructions (Resolves #12)
.
Push your branch to GitHub.
If you're pushing your branch for the first time, you'll have to set the upstream:
git push --set-upstream origin feature-branch-name
Otherwise, just push like usual:
git push origin feature-branch-name
If you forget the branch name:
- Run git status
to see the branch you currently have checked out (among other things).
- You can list existing branches with git branch --list
.
Open a pull request [example].
git checkout master
git pull
git checkout feature-branch-name
git merge master
git push
new pull request
.compare across forks
instead.A maintainer will review your pull request and may ask you to make additional changes. If you have write access to the repo, don't merge your branch into master. The maintainer will merge it when they decide the branch is ready.
Continue to pull, commit, & push changes on your branch to update the open pull request as needed.
Once a pull request is merged, the maintainer may delete the branch if it will no longer be needed in the future.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.