Skip to main content

Contributing

As a member of the phonlab-tcd organisation on Github, you will be able to contribute to our projects. Follow the steps below to clone a repository, create a local branch, commit changes, push to remote and create a pull request.

warning

It is important to follow the steps below exactly as they are described.

Clone the Project

  1. Clone the Repository Click the Code button on the repository you want to work on, copy the SSH URL, and run the following command in your terminal, replacing [URL] with the copied URL.

    git clone [URL]
  2. Navigate into the Project Directory

    cd repository-name

Create a Local Branch

Create a new branch with a name that reflects your work. Use the format [Github-username]/[issue]:

git checkout -b [Github-username]/[issue]

Commit Changes

  1. Make Changes Edit the codebase in your local development environment as needed for your contribution.

  2. Check the Changes Check the files you changed before staging:

    git status
  3. Stage the Changes Add the files you changed:

    git add .
  4. Commit the Changes Commit your changes with a descriptive message:

    git commit -m "Brief description of your changes"

Pushing Local Branches

If this is the first time to push a particular branch, you will first need to run the following:

git push --set-upstream origin [Github-username]/[issue]

Push your changes to the branch on your forked repository on GitHub:

git push origin [Github-username]/[issue]

Creating a Pull Request

  1. Create a Pull Request Go to the repository on GitHub and click the Compare & pull request button.

  2. Describe Your Changes Provide a clear title and description for your pull request. Explain why you made the changes and what they affect.

  3. Submit the Pull Request Click Create pull request to submit your changes for review.

Reviewing Others' Pull Requests

You may also review other contributers' pull requests.

  1. Navigate to the Pull Requests Tab On the original repository, click on the Pull requests tab to view all proposed changes.

  2. Review a Pull Request Choose a pull request to review. Read through the changes and comments, if any.

  3. Provide Feedback Add comments, ask questions, and suggest improvements as needed. Approve the pull request if everything is satisfactory.