Git Basics: Exercises 1.1
Now that you have learned the basics of Git workflow, try running through this a couple of times on your own:
- Create a folder called
learn_git_again. - cd into the
learn_git_againfolder. - Create a file called
third.txt. - Initialize an empty git repository.
- Add
third.txtto the staging area. - Commit with the message
“adding third.txt”. - Check out your commit with
git log. - Create another file called
fourth.txt. - Add
fourth.txtto the staging area. - Commit with the message
“adding fourth.txt” - Remove the
third.txtfile - Add this change to the staging area
- Commit with the message
“removing third.txt” - Check out your commits using
git log - Change your global setting to
core.pager=cat– you can read more about that here. - Write the command to list all of the global configurations for git on your machine. You can type
git config --globalto find out how to do this
You can find the solutions here
When you’re ready, move on to GitHub Introduction