Welcome to the demo repository for learning Git, GitHub, and Open Source Practices. This repository contains example files and instructions to help you get started with version control and collaborative development.
- Introduction
- Getting Started
- Basic Git Commands
- GitHub Workflow
- Contributing
- Editing the HTML Page
- License
This repository is designed to demonstrate basic Git and GitHub workflows and to provide hands-on experience with open source practices.
To get started, you'll need to have Git installed on your machine and a GitHub account.
- Install Git: Download and install Git for your operating system.
- Create a GitHub Account: Sign up for GitHub if you don't already have an account.
- Clone the Repository:
git clone https://github.com/your-username/demo-repository.git cd demo-repository
Here are some basic Git commands you'll use frequently:
- Initialize a Repository:
git init
- Clone a Repository:
git clone <repository-url>
- Check Status:
git status
- Add Changes:
git add <file-name>
- Commit Changes:
git commit -m "Your commit message"
- Push Changes:
git push origin <branch-name>
- Pull Changes:
git pull origin <branch-name>
Here's a typical workflow for contributing to a project on GitHub:
- Fork the Repository: Click the "Fork" button on the repository's GitHub page to create a personal copy.
- Clone the Fork:
git clone https://github.com/your-username/demo-repository.git cd demo-repository
- Create a Branch:
git checkout -b feature-branch
- Make Changes: Edit files and add your changes.
- Commit Changes:
git add <file-name> git commit -m "Describe your changes"
- Push Changes:
git push origin feature-branch
- Open a Pull Request: Go to the original repository on GitHub and click the "New pull request" button.
We welcome contributions to this repository! To contribute, please follow these steps:
- Fork the Repository: Click the "Fork" button on the repository's GitHub page.
- Clone Your Fork:
git clone https://github.com/your-username/demo-repository.git cd demo-repository
- Create a Branch:
git checkout -b your-feature-branch
- Make Your Changes: Edit the files and add your changes.
- Commit and Push Your Changes:
git add <file-name> git commit -m "Description of changes" git push origin your-feature-branch
- Open a Pull Request: Go to the original repository on GitHub and click the "New pull request" button.
We have included an index.html
file in this repository for you to practice editing. Here’s how you can contribute:
- Fork and Clone the Repository: Follow the steps in the GitHub Workflow section.
- Create a Branch:
git checkout -b edit-html
- Make Your Changes: Open
index.html
in your preferred code editor and make some changes. You could add a new section, update styles, fix typos, or add new features. - Commit and Push Your Changes:
git add index.html git commit -m "Made changes to the HTML page" git push origin edit-html
- Open a Pull Request: Go to the original repository on GitHub and click the "New pull request" button.
This project is licensed under the MIT License. See the LICENSE file for more details.