Welcome to the GitHub for Beginners practice repository! This repo is designed to help you learn and practice essential GitHub workflows including forking, cloning, branching, committing, pushing, and creating pull requests.
- β Fork a repository
- β Clone a repository to your local machine
- β Create and switch between branches
- β Make changes to files
- β Stage and commit changes
- β Push changes to GitHub
- β Create Pull Requests
- β Work with Issues
- β Basic Git commands and GitHub workflow
- Click the "Fork" button at the top right of this repository
- This creates a copy of the repository in your GitHub account
# Replace 'your-username' with your actual GitHub username
git clone https://github.com/your-username/Github-for-beginners.git
# Navigate to the project directory
cd Github-for-beginnersπ‘ Tip: To open the project in VS Code from your terminal, run:
code .Make sure you have the VS Code command line tool installed.
# Create and switch to a new branch with your name
git checkout -b feature/your-name-introduction
# Or alternatively
git branch feature/your-name-introduction
git checkout feature/your-name-introduction- Open the
student-introductions.mdfile - Add your introduction following the template
- Save the file
# Check what files have changed
git status
# Add your changes to staging
git add student-introductions.md
# Or add all changes
git add .
# Commit your changes with a descriptive message
git commit -m "Add introduction for [Your Name]"# Push your branch to your fork
git push origin feature/your-name-introduction- Go to your fork on GitHub
- You'll see a prompt to create a Pull Request
- Click "Compare & pull request"
- Add a title and description
- Click "Create pull request"
- Fork and clone this repository
- Create a branch named
add-your-name - Add your name to the
student-introductions.mdfile - Commit and push your changes
- Create a pull request
- Create a branch named
feature/add-new-section - Add a new section to the
practice-file.md - Create multiple commits for your changes
- Push and create a pull request
- Create an issue for a new feature suggestion
- Practice resolving merge conflicts
- Rebase your branch on the latest main
- Squash multiple commits into one
- Review someone else's pull request
- Go to the Issues tab
- Click "New issue"
- Choose from our templates:
- Bug Report
- Feature Request
- Question
- Submission Review
- Use descriptive titles
- Provide detailed descriptions
- Add relevant labels
- Reference related issues or PRs using #number
# Check repository status
git status
# View commit history
git log --oneline
# Check current branch
git branch
# Switch branches
git checkout branch-name
# Create and switch to new branch
git checkout -b new-branch-name
# Delete a branch
git branch -d branch-name# Add specific files
git add filename.txt
# Add all changes
git add .
# Commit with message
git commit -m "Your commit message"
# Add and commit in one step
git commit -am "Your commit message"# Push changes
git push origin branch-name
# Pull latest changes
git pull origin main
# Fetch updates without merging
git fetch upstreamWhen you complete the exercises:
- Move to the main repository (original one) by switching your remote to the upstream/main repo if needed.
- Create an issue on that branch using the "Submission Review" template.
- Include the following information:
- Your GitHub username
- Links to your pull requests
- Screenshot of your contribution
- Brief reflection on what you learned
- Successfully forked the repository
- Cloned to local machine
- Created at least 2 different branches
- Made commits with good commit messages
- Pushed branches to GitHub
- Created at least 1 pull request
- Created at least 1 issue on the main repository
- Added your introduction to the student introductions file
This is a learning repository, and contributions are welcome! If you have suggestions for improvement:
- Create an issue to discuss your idea
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
- Create an issue with the "Question" template
- Check existing issues for similar questions
- Review the documentation links above
This project is licensed under the MIT License - see the LICENSE file for details.
Follow me on social media for updates and more learning resources:
Happy Learning! π
Remember: Making mistakes is part of learning. Don't be afraid to experiment and try new things!
