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.
It is important to follow the steps below exactly as they are described.
Clone the Project
-
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]
-
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
-
Make Changes Edit the codebase in your local development environment as needed for your contribution.
-
Check the Changes Check the files you changed before staging:
git status
-
Stage the Changes Add the files you changed:
git add .
-
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
-
Create a Pull Request Go to the repository on GitHub and click the Compare & pull request button.
-
Describe Your Changes Provide a clear title and description for your pull request. Explain why you made the changes and what they affect.
-
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.
-
Navigate to the Pull Requests Tab On the original repository, click on the Pull requests tab to view all proposed changes.
-
Review a Pull Request Choose a pull request to review. Read through the changes and comments, if any.
-
Provide Feedback Add comments, ask questions, and suggest improvements as needed. Approve the pull request if everything is satisfactory.