DEV Community

Mohamed Mokhtar
Mohamed Mokhtar

Posted on

Guide for creating pull requests on Apache AGE

Introduction

Apache AGE is a graph database that runs on PostgreSQL. It allows users to use the SQL query language to interact with graphs in a more expressive and natural way. If you are new to Apache AGE (Incubating) or unfamiliar with the concept of pull requests, this guide will help you get started with contributing to this project.

Fork the Repository

The first thing you need to do is to fork the Apache AGE (Incubating) repository. To do this, go to the repository's page on GitHub, and click on the "Fork" button in the top-right corner. This will create a copy of the repository under your GitHub account.

Clone the Repository Locally

Now that you have forked the repository, you need to clone it locally to your computer. To do this, open a terminal window and enter the following command:

git clone https://github.com/YOUR-USERNAME/age
Enter fullscreen mode Exit fullscreen mode

Replace YOUR-USERNAME with your own GitHub username and language.

This will create a local copy of the repository on your computer.

Create a New Branch

Before making any changes, you should create a new branch for your work. This will keep your changes separate from the main branch, and make it easier to review and merge your changes later on. In case your project is not being developed on the main branch switch to the project branch instead to be your entry/starting point

To create a new branch, enter the following command:

git checkout -b branch-name
Enter fullscreen mode Exit fullscreen mode

Replace branch-name with a descriptive name for your branch that reflects the task you will be working on (e.g., feature/add-new-functionality).

If you are working on a project for example math-functions make your new branch has a prefix of that and append your todo feature/task after that i.e. git checkout -b math-functions-gcd here you are working on gcd function and math-functions project

Make Your Changes

Now it's time to make your changes. Follow the project's documentation on how to setup the project and work on your task.

When you're finished making your changes, save your files and commit the changes.

git add .
git commit -m "Add a commit message here that describes your changes."
Enter fullscreen mode Exit fullscreen mode

Push Your Changes to GitHub

Once you are finished committing your changes, you can push your branch to GitHub using the following command:

git push --set-upstream origin branch-name
Enter fullscreen mode Exit fullscreen mode

This will push your changes to the branch you just created on your fork of the repository.

Create a Pull Request

Finally, you can create a pull request to contribute your changes to the original repository.

  1. Go to your forked repository on GitHub and select the branch you just pushed your changes to.

  2. Click the "New pull request" button.

  3. On the next page, ensure that the "base repository" is set to the original repository and the "base" branch is set to the main branch.

  4. Then, select your branch (branch-name) as the "compare" branch.

  5. Add a title and description that accurately describe your changes.

  6. Click "Create pull request" to submit your changes for review.

  7. [🌟] If you are going to create a separate task you will need to checkout back the main branch of that project for example if you are working on a branch on the remote repo at the project repo called typecasting, you will need to checkout that at first git checkout typecasting and then make a new branch starting from that clean branch git checkout -b typecasting-feature-name

Congratulations! You have just created a pull request to contribute to the Apache AGE repository. Remember to follow up on any comments and feedback from the community to improve your code and work collaboratively.

References:

Top comments (0)