Exercises: Git
We will use our new terminal powers to move through the Git exercises.
In whichever directory you are keeping your coursework outside of javascript-projects, make a new directory called
Git-Exercises
using themkdir
command. You want to make sure this is outside ofjavascript-projects
because it will cause an issue if you try and make a new Git repository inside an existing one.Inside the
Git-Exercises
directory, initialize a new Git repository usinggit init
.Use
git branch
to check the default branch name. If necessary, change the branch name tomain
.Add a file called
exercises.txt
using thetouch
command in the terminal.Commit your local changes using the
git commit
procedures.Add
"Hello World!"
to the file calledexercises.txt
.Commit your local changes following the same steps that you used for step 5.
Run the
git log
command. Take a screenshot of the result. Make note of what you see!