# How to Fork a GitHub Repository, Make Changes, and Create a Pull Request

Follow these steps to fork an existing repository from GitHub, clone it locally, make changes, and create a pull request to the original repository.

# **Step 1: Fork the Repository**

1. Go to the GitHub page of the repository you want to fork.
    
2. Click the **Fork** button in the top right corner of the page. This creates a copy of the repository in your own GitHub account.
    

# **Step 2: Clone the Forked Repository Locally**

1. Navigate to your GitHub profile and find the forked repository.
    
2. Click the **Code** button and copy the URL (either HTTPS or SSH).
    
3. Open your terminal and run the following command to clone the repository locally:
    

```bash
git clone https://github.com/yourusername/repo-name.git
```

Replace `yourusername` and `repo-name` with your GitHub username and the name of the repository.

# **Step 3: Make Changes Locally**

1. Change into the directory of the cloned repository:
    

```bash
cd repo-name
```

2\. Open the files you want to modify in your preferred text editor, make your changes, and save them.

# **Step 4: Stage and Commit Your Changes**

1. Stage the modified files:
    

```bash
git add .
```

1. Commit your changes with a meaningful message:
    

```bash
git commit -m "Describe your changes here"
```

# **Step 5: Push Changes to Your Forked Repository**

Push your changes to your forked repository on GitHub:

```bash
git push origin main
```

Replace `main` with the name of your branch if you are using a different one.

# **Step 6: Create a Pull Request**

1. Go back to the original repository on GitHub.
    
2. Click the **Pull requests** tab.
    
3. Click the **New pull request** button.
    
4. Choose your forked repository and the branch that contains your changes.
    
5. Click **Create pull request** and provide a title and description for your changes.
    
6. Finally, click **Create pull request** to submit it.
    

# **Conclusion**

You have successfully forked a GitHub repository, cloned it locally, made changes, and created a pull request to the original repository. This process is vital for contributing to open-source projects and collaborating with others. If you have any questions or need further assistance, feel free to ask!
