Welcome to the GitHub Practice repository! This repository is designed to help you learn the basics of GitHub collaboration, including forking, editing files, committing changes, and creating pull requests.
In this exercise, you will:
- Fork this repository
- Add your name to the list of contributors in this README
- Commit your changes
- Create a pull request
- Have your pull request approved and merged
- A GitHub account (create one at github.com if you don't have one)
- For command line users: Git installed on your computer (installation guide)
- Click the "Fork" button at the top right of this page
- This creates a copy of the repository under your GitHub account
- In your forked repository, click on the
README.mdfile - Click the pencil icon (Edit this file) at the top right of the file content
- Scroll down to the "Contributors" section
- Add your name to the list following this format:
- [Your Name] - Scroll to the bottom of the page
- Under "Commit changes," enter a commit message like "Add [your name] to contributors list"
- Select "Commit directly to the main branch"
- Click "Commit changes"
- After committing, you'll return to your repository
- Click on "Pull requests" in the top navigation
- Click the green "New pull request" button
- Ensure the base repository is set to the original repository (instructor's) and the head repository is your fork
- Click "Create pull request"
- Enter a title for your pull request (e.g., "Add [your name] to contributors")
- Optionally add a description
- Click "Create pull request"
- Click the "Fork" button at the top right of this page in your browser
- This creates a copy of the repository under your GitHub account
# Replace YOUR-USERNAME with your GitHub username
git clone https://github.com/YOUR-USERNAME/github-practice.git
cd github-practiceOpen the README.md file in your preferred text editor and add your name to the Contributors section.
# Example using nano (you can use any text editor)
nano README.mdAdd your name in the format: - [Your Name] to the Contributors section.
# Stage your changes
git add README.md
# Commit with a descriptive message
git commit -m "Add [your name] to contributors list"
# Push to your fork
git push origin main- Go to your fork on GitHub in your web browser
- You should see a notification about your recent push, with an option to create a pull request
- Click on "Compare & pull request"
- Ensure the base repository is the original (instructor's) and the head repository is your fork
- Add a title like "Add [your name] to contributors"
- Click "Create pull request"
After you create a pull request:
- The instructor will be notified
- They may review your changes and leave comments
- If everything looks good, they'll approve and merge your pull request
- Your name will appear in the main repository's README!
- Make sure you're editing your fork, not the original repository
- If you don't see your changes, refresh the page
- If you have issues with the command line, try the web interface instead
- If your pull request shows conflicts, you may need to sync your fork first
- Pranav A
- Aaron
- Vinay D
- Enzo L
- Júlia D
- Maxence