From f98714abe32bddf874c11c1f0ca56dd4c99b762d Mon Sep 17 00:00:00 2001 From: Ciaran Bernard Date: Thu, 21 Jun 2018 11:05:17 +0100 Subject: [PATCH 1/2] Add bash commands to steps --- README.md | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/README.md b/README.md index 3548a30..63a0373 100644 --- a/README.md +++ b/README.md @@ -6,18 +6,73 @@ If you want to contribute to a project and make it better, your help is very wel Look for a project's contribution instructions. If there are any, follow them. +{note} The bash commands below will give you step-by-step intructions to contribute to this Contributing project. + - Create a personal fork of the project on Github. - Clone the fork on your local machine. Your remote repo on Github is called `origin`. + +```bash +#To clone your fork into a folder called Contributing +git clone git@github.com:cbernard73/contributing.git Contributing2 +``` + - Add the original repository as a remote called `upstream`. + +```bash +#To add the original repo as a remote called upstream +git remote add upstream git@github.com:MarcDiethelm/contributing.git +``` + - If you created your fork a while ago be sure to pull upstream changes into your local repository. + +```bash +#To pull any recent updates +git pull upstream master +``` + - Create a new branch to work on! Branch from `develop` if it exists, else from `master`. + +```bash +#To create a new local branch and switch to that branch +git checkout -b fb-command-line-examples +``` + - Implement/fix your feature, comment your code. + +```bash +#To make your first change +vi README.md +git add README.md +git commit -m "Add bash commands to steps" + +#Make another change +vi README.md +git add README.md +git commit -m "Add more bash commands to even more steps" + +#Results in two commits to your fork of the repo +``` + - Follow the code style of the project, including indentation. - If the project has tests run them! - Write or adapt tests as needed. - Add or change the documentation as needed. - Squash your commits into a single commit with git's [interactive rebase](https://help.github.com/articles/interactive-rebase). Create a new branch if necessary. + +```bash +#To combine the changes from the previous two commits +git reset --soft HEAD~2 + +#To commit the combined changes and create a new message +git commit -m "Add bash commands to steps" +``` + - Push your branch to your fork on Github, the remote `origin`. + +```bash +git push --set-upstream origin fb-command-line-examples +``` + - From your fork open a pull request in the correct branch. Target the project's `develop` branch if there is one, else go for `master`! - … - If the maintainer requests further changes just push them to your branch. The PR will be updated automatically. From 00b8462ac629ebae426a30d123b216d63f2c397d Mon Sep 17 00:00:00 2001 From: Ciaran Bernard Date: Thu, 21 Jun 2018 11:14:52 +0100 Subject: [PATCH 2/2] Move comments from end of steps to the step they related to --- README.md | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 63a0373..7d9afea 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,12 @@ Contributing ============ If you want to contribute to a project and make it better, your help is very welcome. Contributing is also a great way to learn more about social coding on Github, new technologies and and their ecosystems and how to make constructive, helpful bug reports, feature requests and the noblest of all contributions: a good, clean pull request. -### How to make a clean pull request +The bash commands below will give you step-by-step intructions to contribute to this Contributing project. -Look for a project's contribution instructions. If there are any, follow them. -{note} The bash commands below will give you step-by-step intructions to contribute to this Contributing project. +### How to make a clean pull request +- Look for a project's contribution instructions. If there are any, follow them. - Create a personal fork of the project on Github. - Clone the fork on your local machine. Your remote repo on Github is called `origin`. @@ -37,7 +37,15 @@ git pull upstream master git checkout -b fb-command-line-examples ``` -- Implement/fix your feature, comment your code. +- Implement/fix your feature, comment your code. + + *Remember:* + Follow the code style of the project, including indentation. + If the project has tests run them! + Write or adapt tests as needed. + + And last but not least: Always write your commit messages in the present tense. Your commit message should describe what the commit, when applied, does to the code – not what you did to the code. + ```bash #To make your first change @@ -53,10 +61,6 @@ git commit -m "Add more bash commands to even more steps" #Results in two commits to your fork of the repo ``` -- Follow the code style of the project, including indentation. -- If the project has tests run them! -- Write or adapt tests as needed. -- Add or change the documentation as needed. - Squash your commits into a single commit with git's [interactive rebase](https://help.github.com/articles/interactive-rebase). Create a new branch if necessary. ```bash @@ -74,9 +78,8 @@ git push --set-upstream origin fb-command-line-examples ``` - From your fork open a pull request in the correct branch. Target the project's `develop` branch if there is one, else go for `master`! -- … - If the maintainer requests further changes just push them to your branch. The PR will be updated automatically. - Once the pull request is approved and merged you can pull the changes from `upstream` to your local repo and delete your extra branch(es). -And last but not least: Always write your commit messages in the present tense. Your commit message should describe what the commit, when applied, does to the code – not what you did to the code. +