Welcome to our Git and GitHub workshop! This README will guide you through a hands-on activity where you'll learn how to fork, clone, create branches, commit changes, and make pull requests. Follow these steps to participate in the group activity.
- Fork the Repository: Go to the main repository on GitHub and click the "Fork" button to create a copy of the repository in your own GitHub account.
- Clone Your Fork: Clone the forked repository to your local machine using
git clone [URL of your fork]
.
- Create a New Branch: Create a new branch in your local repository by running
git branch add-YourName
(replace 'YourName' with your actual name). - Switch to Your Branch: Change to your new branch with
git checkout add-YourName
.
- Edit userList.txt: Open
userList.txt
and add your name to the file. - Stage Your Changes: Stage your changes for commit with
git add userList.txt
. - Commit Your Changes: Commit your staged changes using
git commit -m "Add [YourName]"
.
- Push Your Branch: Push your branch to your GitHub fork with
git push origin add-YourName
. - Create a Pull Request: Go to your fork on GitHub and create a new pull request to the main branch of the original repository.
- Review Process: A designated reviewer will check your pull request.
- Merging: Once approved, your pull request will be merged into the main branch of the original repository.
- Stay Updated: Optionally, learn how to sync your fork with the original repository to stay updated with the latest changes.
Feel free to ask questions or seek assistance if you encounter any difficulties during the activity. Happy coding!