Create a new repository on your computer.
A repository is a collection of related items. In our case, when writing software, it is a collection of files related to a software project. You can imagine it as a project folder with all the relevant files inside of it. In fact, that's what it will look like on your computer anyways. Sometimes they're called "repos" for short.
You tell Git what your project is and Git will start tracking all of the changes to that folder. This makes it a Git repository: a folder of items being tracked by Git. Git tracks when files are added, subtracted or even a single letter in a single file is changed. All of this plus who did it and when is tracked by Git. In software, tracking changes like this is called version control.
Terminal (or Bash) is a way to instruct your computer to do things by typing commands rather than clicking applications with your mouse. You can rename files, open files, create new folders, move between directories (folders) and more all by running typed commands. You can even use a text editor for code (like Vim) in your terminal and never have to leave!
Besides navigating your computer, you can also use programs in Terminal that have a command-line interface (CLI), meaning they can be run with commands in terminal. Git is one of these. The first part of the command lets your computer know you're talking to Git. The parts following that are the commands and the different options you want Git to act on.
In Git-it you'll learn a few basic command-line actions (in addition to Git commands) for navigating your computer; they're described within the steps.
You're going to create a new project folder and then initialize it as a Git repository. To make things easier, name your folder what you'd name the project. For this challenge, name the new folder: 'hello-world'.
Time to open your terminal!
In your terminal window, type these commands, one at a time, pressing enter/return after each.
First, make a new folder:
Tip: mkdir stands for make directory
mkdir hello-world
Then go into that folder:
Tip: cd stands for change directory
cd hello-world
Finally, tell Git to initialize (start tracking) the folder you are now in:
git init
The last command should return something starting with "Initialized empty Git repository". The others commands do not return anything.
You did it! If you want to be double-sure that it's a Git repository, type git status
and if it doesn't return 'fatal: Not a git repository...', you're golden!
mkdir <FOLDERNAME>
cd <FOLDERNAME>
ls
git init