diff --git a/README.md b/README.md index 3548a30..a33f1db 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,42 @@ 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. -- Create a personal fork of the project on Github. +- Create a personal [fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/about-forks) of the project on Github. + +

+ Highlighting fork button on profile. +

+ - Clone the fork on your local machine. Your remote repo on Github is called `origin`. -- Add the original repository as a remote called `upstream`. + +

+ git clone [https://github.com/your-username/contributing.git] +

+ +- Add the original repository as a [remote](https://github.com/git-guides/git-remote) called `upstream`. + +

+ git remote add upstream https://github.com/[main-profile-name]/[repository-name].git +

+ - If you created your fork a while ago be sure to pull upstream changes into your local repository. + +

+ git pull upstream master +

+ - Create a new branch to work on! Branch from `develop` if it exists, else from `master`. + +

+ git branch [branch_name] +

+ +- Switch to the newly created brach with: + +

+ git checkout [branch_name] +

+ - Implement/fix your feature, comment your code. - Follow the code style of the project, including indentation. - If the project has tests run them! @@ -18,8 +49,17 @@ Look for a project's contribution instructions. If there are any, follow them. - 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. - Push your branch to your fork on Github, the remote `origin`. + +

+ git push -u [branch_name] +

+ - 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`! -- … + +

+ Gif: How to open a pull request on working branch. +

+ - 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).