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-Exercisesusing themkdircommand. You want to make sure this is outside ofjavascript-projectsbecause it will cause an issue if you try and make a new Git repository inside an existing one.Inside the
Git-Exercisesdirectory, initialize a new Git repository usinggit init.Use
git branchto check the default branch name. If necessary, change the branch name tomain.Add a file called
exercises.txtusing thetouchcommand in the terminal.Commit your local changes using the
git commitprocedures.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 logcommand. Take a screenshot of the result. Make note of what you see!