This repository serves as a hub for Git & GitHub activities, including Generating Pull Requests and mastering essential Git commands.
A pull request (PR) is a way to propose changes to a repository on GitHub. It allows developers to collaborate, review code, and merge contributions into the main branch of a project.
- Go to the GitHub repository you want to contribute to.
- Click on the Fork button in the top-right corner.
- This will create a copy of the repository under your GitHub account.
- Copy the repository’s URL from your forked repository.
- Run the following command in your terminal to clone the repository locally:
git clone https://github.com/Heramb4270/Quark-Contribution.git cd Quark-Contribution
- Create and switch to a new branch for your changes:
Example:
git checkout -b <branch-name>
git checkout -b feature/add-new-functionality
- Open the colaborators.json file in any text editor or IDE.
- Add your details in the following format under the "colaborators" array:
{ "collaborators":[ { "name": "Your Name", "year": "First Year", "dept": "Your Department", "funfact": "A short and engaging fact about yourself or something related to your interests.", "feedback": "Your feedback" } ] }
- Example Entry:
{ "collaborators":[ { "name": "John Doe", "year": "TY", "dept": "CS", "funfact": "The first computer game was made in 1962! 🎮", "feedback": "Got to know how to generate pull requests on Github" } ] }
- After making the changes, check the status of modified files:
git status
- Stage the modified files:
git add .
- Commit the changes with a descriptive message:
Example:
git commit -m "<Your commit message>"
git commit -m "Added functionality to handle user authentication"
- Push your branch to your forked repository:
Example:
git push origin <branch-name>
git push origin feature/add-new-functionality
- Go to your forked repository on GitHub.
- Navigate to the branch you pushed changes to.
- Click the Compare & pull request button.
- Fill out the pull request form.
- Click Create pull request.
- Keep it Focused: Limit your pull request to a single feature or fix.
- Write a Clear Description: Explain why your changes are necessary and what they do.
- Follow Coding Standards: Adhere to the coding conventions of the repository.
- Test Your Changes: Ensure your code works as intended and doesn’t break existing functionality.
- Be Responsive: Address feedback from reviewers promptly.
If you face any issues or have questions, feel free to reach out.
Happy Coding! 🚀