Command Shift

Initialising Git

You'll often hear us talking about repositories (or repos). A repository is the place where all of your project files are stored. Repos can be available locally (in your computer) or remotely (in servers like Github).

Not all repos have git initialised, since not all of your computer folders need to have their changes tracked.


:warning:

Remember, these steps are intended to give you some light theory into Git and the various commands. We don't recommend trying these commands out at this stage, but if you really want to then we'd encourage you to create a dummy folder and to initialise a Git repository / experiment with the different commands inside there.


In order to initialise Git in a repository and start tracking your changes, move inside of the repo (project folder) you want to track and run the following command in your terminal:

git init

git init

If you want to check if a repo is being tracked, you can do so by:

git status

git status

Or if you list the content of the repo, and if it is initialised, you should see a .git folder.

ls -la

If you wish to stop tracking:

rm -rf .git

On this page

No Headings