/opensource

This repository will help you to contribute open source on GitHub. It will cover all the steps you need to follow to do any kind of open source contribution.

MIT LicenseMIT

Open Source Contribution

GitHub Repo stars GitHub forks GitHub

This repository will guide you through the process of contributing to open source on GitHub.

Install Git

Click Git to install Git on your machine.

Git Setup

To avoid any errors, follow these steps after installing Git:

  1. Open a terminal and run the following command to set your Github username:
git config --global user.name "username"
  1. Set your Github email with the following command:
git config --global user.email "email@example.com"

Fork the Repository

Fork this repository by clicking the fork button. This will create a copy of the repository in your own account.

2. Go to your account and open the forked repository. Click on the code button to copy the link.

3. Run the following command to clone the repository to your machine:

Example

git clone https://github.com/your-username/opensource.git
  1. Change the directory to the newly cloned repository:
cd opensource

Create a Branch

It is best practice to create a new branch. Run the following command in the terminal:

git switch -c anyname

Open the name.md File

While still in the terminal, open the name.md file (located inside the opensource folder).

  1. Add your username and Github profile link to the name.md file.
  2. Save the file and go back to the terminal.
  3. Run the following command to stage the changes:

Example


git add .
  1. Commit the changes with a descriptive message, using your username:

make sure to use "commas " after -m

git commit -m "added (username) in the name.txt"

Example:

git commit -m "added (samadpls) in the name.txt"
  1. Push the changes to the remote branch with the following command:

Finally

git push origin -u your-branch-name

If the above command gives an error, run the following command instead:

git config --global push.autoSetupRemote true

if error not resolve watch this video YouTube

Submit a Pull Request

Go to your Github account and you will see the option to create a pull request. Merge the changes into your repository and then create a pull request.

After merging it in your repository, open my repository again and create a pull request by going on the pull request option, then you will see this option




set dropdown compare option and select your repo, and send pull request.

Congratulations, you now know how to contribute to open source!

Contributor

If you stuck somewhere or getting any error you can also check the YouTube video
HELP


Inspired by First-contribution