A repository that can be used to take class notes and also practicing git. This repository will be used for working through Week 2's lab.
We'll start by forking this class-notes
repository, opening up a Codespace on your forked version and then follow the below instructions.
- Open a terminal window and create a new directory called
test
- Navigate to the
test
directory - Create a new file called
test.txt
- Open the file in VS Code and make a few changes, save the file and close it.
- Navigate back out of the
test
directory - Delete the
test
directory
- Create a new branch for the changes you are about to make.
- Create a new file in the
notes
directory with the name of the topic you want to take notes on. For example, if you want to take notes on git, create a file calledgit.md
. - Add some notes to the file. You can use markdown to format your notes.
- Use
git add
to stage your changes for a commit, then usegit status
to view the current state of your project (you should see the file you just created). - Commit your changes and push your new branch to GitHub.
- Create a pull request to merge your branch into the
main
branch. - Have someone else review your pull request and resolve any feedback.
- Merge your pull request into the
main
branch and delete your branch. - Pull the latest changes from
origin
to your local machine and confirm your changes are there. - Celebrate! 🎉
- Try making another change to your notes
- Create a new branch
- Make a change (like adding a new file or changing an existing one)
- Commit it
push
it toorigin
and merge it intomain
- Switch back to the
main
branch on your repository andpull
your latest change. - Use
git log
to see a list of your changes. - Revert your changes by creating a new branch and reverting the commit that you made.
- Commit your changes and push your new branch to GitHub.
- Create a pull request to merge your branch into the
main
branch. - Have someone else review your pull request and resolve any feedback.
- Merge your pull request into the
main
branch and delete your branch. - Pull the latest changes from
origin
to your local machine and confirm your changes are there. - Celebrate! 🎉
An overview of these basic git commands can be found on the Odin Project.