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
- Working Directory: Your current folder where you edit files.
- Staging Area: Like a moving box. You put files here that you want to save.
- Repository (.git): The permanent history (the sealed box).
Basic Commands
To initialize a repo:
bashgit init
To check status:
bashgit status
To add files to Staging:
bashgit add .
To save to history:
bashgit commit -m "Descriptive message"
Practical Exercise
- Create a folder
my-first-repoand enter it. - Run
git init. - Create an
index.htmlfile. - Use
git add .. - Use
git commit -m "Initial commit".
