The exercises are to practice basic Git commands. Follow the instructions below to complete the assignments.
- Clone the remote Github repository.
- Create a file called
music.txt
. - Enter the name of your favorite artist in
music.txt
. - Add
music.txt
to the staging area. - Check the state of the staging area with
git status
. - Commit with the message "adding music.txt".
- Check out your commit with
git log
. - Create another file called
food.txt
. - Enter the name of your favorite food in
food.txt
. - Add
food.txt
to the staging area. - Check the state of the staging area with
git status
. - Commit with the message "adding food.txt".
- Remove the
music.txt
file. - Add this change to the staging area.
- Check the state of the staging area with
git status
. - Commit with the message "removing music.txt".
- Rename
food.txt
tomeals.txt
. - Add this change to the staging area.
- Check the state of the staging area with
git status
. - Commit with the message "renaming food.txt to meals.txt".
- Update the remote GitHub repository with the local commits.
- Find a classmate to collaborate on the assignment.
- Invite each other as collaborators to the repositories of each other.
- Clone the remote Github repository of your classmate.
- Add your favorite food to
meals.txt
in a new line. - Add this change to the staging area.
- Commit with the message "adding my favorite food".
- Update the remote GitHub repository with the local commit.