Welcome, Hackathon Participants! π This guide will walk you through the process of submitting your project to this repository using GitHub. We will cover everything from forking the repository to creating a pull request (PR). Follow these steps carefully to ensure your submission is successful and free of dependency issues.
Before you begin, ensure you have the following:
- A GitHub account.
- Git installed on your local machine.
- Node.js and npm installed (if applicable for your project).
- Basic understanding of Git and GitHub.
-
Fork this repository:
- Click on the "Fork" button at the top right corner of this repository page.
- This will create a copy of this repository under your GitHub account.
-
Clone your forked repository:
git clone https://github.com/<your-username>/<repository-name>.git
Replace
<your-username>
with your GitHub username. -
Navigate into the cloned directory:
cd <repository-name>
To keep your fork in sync with the original repository:
-
Add the original repository as an upstream remote:
git remote add upstream https://github.com/<original-owner>/<repository-name>.git
-
Verify the new upstream remote:
git remote -v
-
Pull the latest changes from the main branch:
git pull upstream main
-
Create a new branch for your hackathon project:
git checkout -b <team-name>-submission
Replace
<team-name>
with your team's name.
To avoid dependency issues:
-
Install project dependencies:
npm install
-
Check for outdated or missing dependencies:
- If you encounter any issues, try using:
npm audit fix
- If you encounter any issues, try using:
-
Lock package versions:
- If you are adding new dependencies, ensure you use exact versions to avoid conflicts:
npm install <package-name>@<version> --save-exact
- If you are adding new dependencies, ensure you use exact versions to avoid conflicts:
-
Commit the updated
package-lock.json
oryarn.lock
:git add package-lock.json git commit -m "Updated dependencies"
Now, build your hackathon project within the newly created branch. Make sure to:
- Write clean, modular, and well-documented code.
- Test your application thoroughly before submission.
- Include relevant documentation for your project in a separate
README.md
file.
Before submitting your pull request, ensure your branch is up to date:
-
Fetch the latest changes from the upstream repository:
git fetch upstream
-
Merge changes into your branch:
git merge upstream/main
-
Resolve any merge conflicts, if they occur.
-
Add all your changes:
git add .
-
Commit your changes with a descriptive message:
git commit -m "Add hackathon project submission by <team-name>"
-
Push your branch to your forked repository:
git push origin <team-name>-submission
-
Go to the original repository on GitHub.
-
Click on the "Compare & pull request" button.
-
Ensure your pull request:
- Targets the
main
branch of the original repository. - Has a clear title and description.
- Includes relevant details such as your team members, project overview, and any special instructions.
- Targets the
-
Submit your pull request.
-
Dependency conflicts:
- Delete
node_modules
andpackage-lock.json
, then run:rm -rf node_modules package-lock.json npm install
- Delete
-
Merge conflicts:
- Use a merge tool like
git mergetool
or manually resolve conflicts, then commit the resolved files.
- Use a merge tool like
-
Failed builds:
- Ensure that your project passes all tests and linting checks before submitting.
You have successfully submitted your hackathon project! π Thank you for participating, and good luck! π https://t.me/Lisk_kenya If you have any questions or need further assistance, feel free to reach out to us.
Happy Coding! π»π