Let's create a directory where we'll store the files for our project.
To create a directory, let's use MK Dir command.
Let's run it with the name of the directory.
I'll run MK Dear Demo and to change the Active Directory to the newly created one.
I'll type SID demo.
These two commands work on all operating systems Windows, Mac, iOS or Linux.
Now we can also refer to it as a repository.
This directory will contain all the files and since we are in the repository we need to initiate gear
to start using it.
To do this we'll run the following command.
Git in it by the way for you to know.
Just like getting it all git commands.
Begin with the keyword git and followed by the command.
Let's check this repository with the ls command tile type ls dash la.
Notice this newly created dot git directory.
All information related to get is stored in this directory, in this repository and this dot git directory
and its contents are normally hidden from view.
And the only thing you should know that it is there never added any files in this dot git directory.
It can corrupt the whole repository.
So now when we've initialized git, let's add a few files to our repository.
You can add any files to this repository which you consider are good for your learning process.
As for me, for now, I'll add one file.
I'll type Dutch file one.
This Dutch command will create an empty file.
Now, when something is changed in our repository, let's see how good reacts to it.
Let's type git status.
You have to remember this command because it is one of the most used git commands.
This command shows the status of your repository.
It also provides such information as files which are untracked, which are tracked and what changes
are and which is the current branch and what is the status of the current branch.
So you should use this git status command very often.
Now get have to know which files to track or which files should be untracked.
If you decide to track the file with Git, it will monitor the changes being made to that file.
And on the other hand, the changes to an entourage file are ignored by git.
Now checking the status of our repository, we can see that one file is currently marked in red and
it is on direct.
In order to track this file or files, we can run the following command git add file one in case you
want to add the whole directory or the whole repository, you have to run the following command git
add dot or git at dash capital A it will tell it to track the current directory as well as any files
or subdirectories within the current directory.
Be aware of using this command because you can end up adding unnecessary files to your repository.
Now when we set to get that, we want some files to be tracked and we added these files.
We are ready to make a commit, commit to the sort of a snapshot or a state of your repository.
In a particular moment of time.
You can revert to this snapshot whenever you want and get back to the exact version of this file with
all the changes if you need to.
So let's run the following command.
Git commit dash.
Hm.
And the command concerning this commit This dash am option specifies that you are going to add a message
for you to know what changes were made to this commit.
For example, in my case I'll write git commit the same added file.
One Please note that a min and full commit message is an essential part of your commit and it will be
important in the future for you or someone else to know why you created this commit.
Some files will read it or some changes to the project were made after running git commit command.
Please notice the string with letters and digits.
It's the hash of the commit or its identity.
This hash is a unique identifier and signature for each command generated automatically by git.
And you can refer to this particular commit by using this hash.
Next up, we'll take a look at how we could use remote repository and how to copy your files to this
remote repository which will enable you to work in a team or others can access this repository and make
use of it.