Check out the slides here for the tutorial
- Creating a new repository on the command line:
$ echo "# repo-name" >> README.md
$ git init
$ git add README.md
$ git commit -m "init repo"
$ git branch -M main
$ git remote add origin https://github.com/username/repo-name.git
$ git push -u origin main
- Cloning a repository from GitHub:
$ git clone https://github.com/username/repo-name.git
- Initializing a new project (e.g. using create-react-app):
$ npx create-react-app my-app
- Creating a new branch and switching to it:
$ git branch new-feature
$ git checkout new-feature
- Making changes to the code and committing:
$ git add .
$ git commit -m "Added new feature"
- Pushing changes to the remote repository:
$ git push origin new-feature
-
Creating a pull request on GitHub:
- On GitHub, navigate to the main branch of your repository
- Click on "Pull requests" tab
- Click on "New pull request" button
- Select the branch you just pushed
- Click on "Create pull request"
-
Merging the pull request:
- On GitHub, navigate to the pull request
- Click on "Merge pull request"
- Confirm the merge