Before using Git on any system for the first time, it is a good idea to set your name and email address, since Git will include this information in each commit message you author. Follow these steps:
$ git config --global user.name "<Your Name>"
$ git config --global user.email <your_email_address>
If you intend to write your code on the department's systems (e.g. while connected via SSH), all you need to do is initialize a standard Git repository. To do this, follow these steps.
$ git config --global -l
$ cd ~/Courses/CS/CS1/Labs
Lab1
, run:
$ git init Lab1
Initialized empty Git repository in ~/Courses/CS/CS1/Labs/Lab1/.git/(Note: the exact path may differ based on your exact setup!!)
$ cd Lab1 $ ls -aNow look for the hidden
.git
folder.
This folder identifies the directory as a Git repository.
If you see it, you know the init
was successful!