This tutorial was originally made by Radwan Albahrani. I've copied it and removed the segments on branching and beyond to keep it simple. This abridged tutorial only covers what you need to know to submit tasks for the GDG Game Development Bootcamp.
This tutorial will guide you through the process of setting up your development environment and contributing to a project on GitHub.
- Understand the basics of Git and GitHub.
- Learn how to clone a repository.
- Learn how to add changes to a repository.
- Learn how to commit changes to a repository.
- Learn how to push changes to a repository.
- Learn how to create a pull request.
- Git and Github
- Git Tutorial (w3schools.com)
- How to Use Git and GitHub – Introduction for Beginners (freecodecamp.org)
- Learn Git Branching (Interactive tutorial)
- Git - Basic Branching and Merging (git-scm.com)
- Pull Requests in VS Code - YouTube
-
Fork the repository by clicking the fork button on the top right corner of the repository page.
- Click the fork Button
This section will guide you through the process of cloning a repository, adding changes, committing changes, pushing changes, and creating a pull request.
- Open the terminal and run the following commands to configure Git:
git config --global user.name "<your-name>"
git config --global user.email "<your-email>"These commands will set your name and email for Git. This information will be used to identify you as the author of the changes you make.
Example:
git config --global user.name "John Doe"
git config --global user.email "JohnDoe@gmail.com"- Open the terminal and navigate to the directory (also known as folder) where you want to clone the repository.
- Go to the repository page on your own account and click on the green code button.
- Copy the link under the clone section.

- Run the following command inside of the opened terminal to clone the repository:
git clone <The Link from your Repository>Example:
git clone https://github.com/YOUR_NAME/Selection-Project.git-
Open the repository directory in VS Code.
- The path must be INSIDE the cloned repository.
- Click on File -> Open folder

- Select the repository folder.

- The repository should be opened in VS Code.

- To make sure, run the following command in the terminal INSIDE Vscode:
git status
-
Run the following command to add the changes:
git add .- Run the following command to commit the changes:
git commit -m "<commit-message>"- Run the following command to push the changes:
git push- Go to the repository page and click on the pull request button.

- Click on the new pull request button.

- Select the branch you want to merge into the main branch.

- Click on the create pull request button.

- Add a title and description for the pull request. Title should be in the following format:
<your-name> - <project-name>.
- Click on the create pull request button.

This tutorial has covered the basics of Git and GitHub enough for you to start submitting your tasks. You should now be able to clone a repository, add changes, commit changes, push changes, and create a pull request.







