Logo hdtoledo
hdtoledo.dev
Módulos_del_Sistema
EJERCICIO_PRÁCTICO

Your First Repository

Your First Repository

Every project under version control is called a Repository (or "repo").

The 3 States of Git

  1. Working Directory: Your current folder where you edit files.
  2. Staging Area: Like a moving box. You put files here that you want to save.
  3. Repository (.git): The permanent history (the sealed box).

Basic Commands

To initialize a repo:

bash
git init

To check status:

bash
git status

To add files to Staging:

bash
git add .

To save to history:

bash
git commit -m "Descriptive message"

Practical Exercise

  1. Create a folder my-first-repo and enter it.
  2. Run git init.
  3. Create an index.html file.
  4. Use git add ..
  5. Use git commit -m "Initial commit".