From b1efa19d2df760e2d3c2939a9a254e4f404c51de Mon Sep 17 00:00:00 2001 From: Elvis Otieno <125451537+the1Riddle@users.noreply.github.com> Date: Sun, 17 Mar 2024 12:34:31 +0300 Subject: [PATCH 1/3] pr template Co-authored-by: the-1Riddle --- .github/PULL_REQUEST_TEMPLATE.md | 33 ++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..cd64492 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,33 @@ +# Description + +A short summary of what is included in your Pull Request. + +Fixes #(issue_no) + + +- [ ] Issue_no: `````` +- [ ] Not applicable + + +## Type of change + +Choosing one or more options from the following as per the nature of your Pull request. + +- [ ] Bug fix (non-breaking change which fixes an issue) +- [ ] New feature (non-breaking change which adds functionality) +- [ ] Documentation Update + +# Checklist: +Please tick all the boxes that are fulfilled by your Pull Request. + +- [ ] My code beats 50% + of the users, will 💙 to hear this. +- [ ] I have named my files and folder, according to this project's guidelines. +- [ ] My code follows the style guidelines of this project and uptodate with the current trends. +- [ ] I have commented on my code, particularly in hard-to-understand areas and included the time complexity O(n). +- [ ] I have created a helpful and easy to understand `README.md` especialy when you created a new directory. +- [ ] My changes do not produce any warnings. + + + From 139e373fb2f30afe82db9995c41b88bc6522c2e0 Mon Sep 17 00:00:00 2001 From: Elvis Otieno <125451537+the1Riddle@users.noreply.github.com> Date: Sun, 17 Mar 2024 13:14:39 +0300 Subject: [PATCH 2/3] CONTRIBUTING.md . > . ? Co-authored-by: the-1Riddle --- CONTRIBUTING.md | 171 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 171 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..53ce802 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,171 @@ +# Contributing + +So, you want to contribute to this project! That's awesome. However, before doing so, please read the following simple steps how to contribute. +This will make the life easier and will avoid wasting time on things which are not requested. ✨ + +## Discuss the changes before doing them + + - First of all, open an issue in the repository, using the [bug tracker](https://github.com/the-1Riddle/Leetcode-c-Solutions/issues), + describing the contribution you would like to make, the bug you found or any + other ideas you have. This will help us to get you started on the right + foot. + + - It is recommended to wait for feedback before continuing to next steps. + However, if the issue is clear (e.g. a typo) and the fix is simple, you can + continue and fix it. + +## Steps to follow + +
+ +Step 1: Star The Repo (Optional) + +
+ + - Star the repo by pressing the topmost-right button to start your wonderful journey + +![star repo](https://docs.github.com/assets/images/help/stars/starring-a-repository.png) + +
+ +--- + +
+ +Step 2: Fork this repo + +
+ +- On the [GitHub page for this repository](https://github.com/the-1Riddle/Leetcode-c-Solutions), click on the Button ["**Fork**"](https://github.com/the-1Riddle/Leetcode-c-Solutions/fork). + +![fork image](https://upload.wikimedia.org/wikipedia/commons/3/38/GitHub_Fork_Button.png) + +
+ +--- + +
+ +Step 3: Clone it + + +- **Method 1:** GitHub Desktop + +> ⚠️ **NOTE:** If you're not familiar with Git, using **GitHub Desktop Application** is a better start. If you choose this method, make sure to download it before continuing reading. +> +> ❗❗ Access link to download [**here**](https://desktop.github.com). + +- **Method 2:** Git + +Clone the forked repository. Open git bash and type: + +```bash +git clone https://github.com//Leetcode-c-Solutions.git +cd Leetcode-c-Solutions +git config --global user.name "" && git config --global user.email "your GitHub primary email" +``` + +> This makes a local copy of the repository in your machine. +> +> ⚠️ **Replace \!** + +Learn more about [forking](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) and [cloning a repo](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository). + +
+ +--- + +
+ +Step 4: Create your feature branch + + +Always keep your local copy of the repository updated with the original repository. +Before making any changes and/or in an appropriate interval, follow the following steps: + +- **Method 1:** GitHub Desktop + +Learn more about how to create new branch [here](https://docs.github.com/en/desktop/contributing-and-collaborating-using-github-desktop/making-changes-in-a-branch/managing-branches#creating-a-branch) and how to fetch and pull origin from/to your local machine [here](https://docs.github.com/en/desktop/contributing-and-collaborating-using-github-desktop/keeping-your-local-repository-in-sync-with-github/syncing-your-branch). + +Learn more about how to fetch and pull origin from/to your local machine using **GitHub Desktop** [here](https://docs.github.com/en/desktop/contributing-and-collaborating-using-github-desktop/keeping-your-local-repository-in-sync-with-github/syncing-your-branch). + +- **Method 2:** Git + +Run the following commands **_carefully_** to update your local repository + +```sh +# If you cloned a while ago, get the latest changes from upstream +git checkout +git pull upstream + +# Make a feature branch (Always check your current branch is up to date before creating a new branch from it to avoid merge conflicts) +git checkout -b + +# +``` + +
+ +--- + +
+ +Step 5: Ready, Set, Go... + + +Once you have completed these steps, you are ready to start contributing to the project and creating **pull requests**. + +- Create a folder if you want to contribute solutions to a new programming language + > The folder name **must** be the name of the language and the files **must** be the names of the questions. +- Write your code and add to the respective folder in the projects directory, locally. +- Don't forget to add a `README.md` in your folder. + +* **Method 1:** GitHub Desktop + +Learn more how to pull request from your local machine using **GitHub Desktop** to the main repo [here](https://docs.github.com/en/desktop/contributing-and-collaborating-using-github-desktop/working-with-your-remote-repository-on-github-or-github-enterprise/viewing-a-pull-request-in-github-desktop). + +- **Method 2:** Git + +Add the changes with `git add`, `git commit`: + +```bash +git add -A +git commit -m "" +``` + +Push the code _to your repository_. + +```bash +git push origin +``` + +make sure you have no conflicts. 🙂 🙂 + +
+ +--- + +
+ +Step 6: Pull Request + + +Go to the GitHub page of _your fork_, and **make a pull request**: + +Read more about pull requests on the [GitHub help pages](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request). + +Now wait, until _your Pull Request_ is approved! If there are any conflicts, you will get a notification. + +
+ +## Wait for feedback +Before accepting your contributions, we will review them. You may get feedback +about what should be fixed in your modified code. If so, just keep committing +in your branch and the pull request will be updated automatically. + +## Everyone is happy! 🤗 +Finally, your contributions will be merged, and everyone will be happy! :smile: +Contributions are more than welcome! + +Thanks! :sweat_smile: + From 0bd2eaf69e3f96b2116f7f0f35fef265b7a7adaf Mon Sep 17 00:00:00 2001 From: Elvis Otieno <125451537+the1Riddle@users.noreply.github.com> Date: Sun, 17 Mar 2024 13:19:52 +0300 Subject: [PATCH 3/3] CONTRIBUTING.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We made this with ❤️ not only to give you info on how to contribute to this project, but the overall knowledge on how to contribute to other projects also. Co-authored-by: the-1Riddle --- CONTRIBUTING.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 53ce802..ce12c3d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -154,10 +154,12 @@ Go to the GitHub page of _your fork_, and **make a pull request**: Read more about pull requests on the [GitHub help pages](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request). -Now wait, until _your Pull Request_ is approved! If there are any conflicts, you will get a notification. +- Now wait, until _your Pull Request_ is approved! If there are any conflicts, you will get a notification. +
+ ## Wait for feedback Before accepting your contributions, we will review them. You may get feedback about what should be fixed in your modified code. If so, just keep committing