
# Introduction to Collaborative programming
Get ready for collaborative coding with this quick guide on using Git and GitHub. It's your go-to crash course for diving into contributions on existing projects. Whether you're new or need a refresher, this guide makes collaborative coding a breeze. Let's dive in!
**Prerequisites**
* Project existence on Github
* Basic knowledge of Git & Github
* You must be added as a contributor to that project
1. **Clone the repository locally**
*git clone <repository url>*
2. **Project Branching**
Create and switch to a new branch => *git checkout -b <branch-name>*
3. **Make Changes and Commit:** After making changes to your branch, follow these steps
* Add changes to staging area: *git add .*
* Commit these changes: *git commit -m "Your commit message"*
* Push changes to Github: *git push origin <branch-name>*
3. **Open a Pull Request (PR)**
* Go to the GitHub repository.
* Click on the "Pull Requests" tab.
* Click the "New Pull Request" button.
* Select the base branch (usually master) and the compare branch (e.g., feature-branch).
* Add a title and description to your pull request.
4. **Code Review**: Team members review the changes, provide feedback, and discuss any necessary modifications.
5. **Merge the Pull Request:**
If the changes are approved, click the "Merge Pull Request" button.
Confirm the merge.
6. **Delete the Branch (Optional)**: After merging, you can delete the feature branch locally and remotely.
*git branch -d feature-branch* (locally)
*git push origin --delete feature-branch* (remotely)
7. **Update Local Master Branch**: Switch to the master branch
*git checkout master
git pull origin master*