Hello World on Github
The Hello World tutorial teaches the workflow you'll use daily: repositories, branches, commits, and pull requests.
Concepts Introduced
- Repository: A project container for files + history
- Branch: A parallel version of the repository
- Commit: A snapshot of changes made to the files
- Pull Request (PR): A request to merge changes from one branch to another
Hands-On: Hello World Tutorials
- Create a Repository
- Click + "New Repository" on your GitHub dashboard.
- Name it
hello-world - Add a README.md file (this serves as your project;s description).
- Create a Branch"
- By default, your repo has one branch:
main. - Create a branch called
readme-edits. - This allows you to test changes without affecting
main.. - Make Changes and Commit Changes
- Edit the
README.mdby adding a line like:Hello, World! This is my first commit. - Save and commit your changes with a message: "Added introduction to README".
- Open a Pull Request (PR)
- Go to the "Pull requests" tab in your repository.
- Click "New pull request".
- Select your
readme-editsbranch as the compare branch. - Click "Create pull request".
- Review and Merge the Pull Request
- Once satifsied, click Merge Pull Request
- You can now delete the branch
readme-editssince its changes are inmain.
Congratulations! You've completed the Hello World tutorial and experienced the core GitHub workflow.