This repository provides a step-by-step walkthrough of basic workflow using Git and GitHub. Follow these steps to learn the fundamentals of collaborative coding and version control.
Forking creates a personal copy of someone else's project. It allows you to freely experiment with changes without affecting the original project. Forking is essential for contributing to open-source projects or using someone's project as a starting point for your own.
Cloning creates a local copy of a repository on your computer, allowing you to work on the project offline.
navigate to the folder where you want to clone the repository and type
gh repo clone <repository-url>
repository URL is available on github page of the repo, click on the green code button and copy the url
- Open VS Code
- Press
Ctrl+Shift+P
(orCmd+Shift+P
on Mac) to open the command palette - Type "Git: Clone" and select it
- Enter the repository URL and choose a local destination
A branch is a separate line of development. It allows you to work on different features or experiments without affecting the main codebase.
Creating a new branch keeps the main branch clean and stable. It also allows for easier collaboration and code review, and prevent's unwanted conflicats later on when multiple people are working on the same project.
open the repo folder in terminal and type
gh branch create <your-name>
gh checkout <your-name>
- Click on the branch icon in the bottom-left corner
- Click "Create new branch"
- Enter your name as the branch name and press Enter
- Add your image to
/public/images
- Add yourself to
/src/components/people.tsx
- Open the Source Control view (Ctrl+Shift+G or Cmd+Shift+G on Mac)
- Enter a commit message
- Click the checkmark to commit
gh commit -m "Add [Your Name] to contributors list"
Merging combines the changes from one branch into another. We will combine changes in your current name branch to the main branch of the repo.
- Switch to the main branch
- Click on the branch icon in the bottom-left corner
- Select "Merge branch..." and choose your named branch
gh checkout main
gh merge <your-name>
Changes made on your local machine are not automatically synchronized with the remote repository.
gh push origin main
Click the "Sync Changes" button in the Source Control view
A pull request is a way to propose changes to the original repository. It allows for code review and discussion before merging.
- Go to the original repository on GitHub
- Click "Pull requests"
- Click "New pull request"
- Select your fork and the branch with your changes
- Click "Create pull request"
- Congratulations on your successful contribution!
- You can continue making changes to your local repository without needing to clone again.
- find some cool repo's and start contibuting, or make your own ones with your friends