We need to configure Git to contain your information. Whenever code changes, Git tracks who made the change. To ensure you get proper credit (or more likely, blame) for all the code you write, you need to set your name and email.
Git comes with a configuration both at the global and the repo (project) level. Most of the time, you'll just use the global config.
Let's set your identity. Check if your user.name and user.email are already set using config get:
git config get user.name
git config get user.email
If they aren't, set them using config set. I recommend using your GitHub username and email.
git config set --global user.name "github_username_here"
git config set --global user.email "[email protected]"
Finally, let's set a default branch (we'll talk more about configs and branches later) so that we're all on the same page. Run:
git config set --global init.defaultBranch master
We're using
masterfor now because it is Git's default, but later we'll change it tomain, which is GitHub's default. Just bear with us for a second.
Your ~/.gitconfig file is the file that stores your global Git configuration. View it:
cat ~/.gitconfig
Run and submit the CLI tests.