From 8123d49cf2fa78eabaecddd4f2a741b74db5a3fc Mon Sep 17 00:00:00 2001 From: Joel <64314452+joeltorres-7@users.noreply.github.com> Date: Sat, 16 Apr 2022 12:12:25 -0500 Subject: [PATCH] Add extra notes and examples to README.md In other to make it more user-friendly to new Github members, I considered it convenient to add examples of how to perform some of the basic processes in Git Bash such as clone, remote, branch, and push, as well as visual clues. It has been a while since the last update, so I hope it becomes even more helpful for future users. --- README.md | 46 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 43 insertions(+), 3 deletions(-) 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).