Repository created during my second year of Web Application Development (DAW) to learn Git and version control.
git --versionDisplays the version of Git installed on the computer.
git initInitializes a new Git repository by creating a hidden .git directory.
git statusShows modified, staged and untracked files.
git add filenameAdds a specific file to the staging area.
git add .Adds all modified and new files to the staging area.
git commit -m "Description of the changes"Creates a commit with the staged changes and an explanatory message.
git showDisplays detailed information about the latest commit and its changes.
git restore filenameDiscards changes made to a file that has not been committed.
git checkout branch-nameChanges from the current branch to another branch.
git checkout commit-hashTemporarily displays the project as it existed in a specific commit.
git reset --hard commit-hashgit branch
git merge
git swithc
:wq
Returns the repository to a specific commit and deletes subsequent local changes.
⚠️ Warning:git reset --hardpermanently discards uncommitted changes. Use it carefully.
The purpose of this repository is to practise the basic Git workflow, understand version control and document the commands learned during the course.
🟡 Work in progress
This repository will be updated as I learn new Git commands and concepts.
Repositorio creado durante mi segundo curso de Desarrollo de Aplicaciones Web (DAW) para aprender Git y el control de versiones.
git --versionMuestra la versión de Git instalada en el equipo.
git initInicializa un repositorio Git creando una carpeta oculta llamada .git.
git statusMuestra los archivos modificados, preparados y todavía no controlados por Git.
git add nombre-archivoAñade un archivo concreto al área de preparación.
git add .Añade todos los archivos nuevos y modificados al área de preparación.
git commit -m "Descripción de los cambios"Crea un commit con los cambios preparados y un mensaje explicativo.
git showMuestra información detallada sobre el último commit y sus cambios.
git restore nombre-archivoDescarta los cambios realizados en un archivo que todavía no se han confirmado.
git checkout nombre-ramaCambia de la rama actual a otra rama.
git checkout hash-del-commitPermite consultar temporalmente el estado del proyecto en un commit concreto.
git reset --hard hash-del-commitDevuelve el repositorio a un commit concreto y elimina los cambios locales posteriores.
⚠️ Aviso:git reset --hardelimina los cambios no confirmados de manera permanente. Debe utilizarse con precaución.
El objetivo de este repositorio es practicar el funcionamiento básico de Git, comprender el control de versiones y documentar los comandos aprendidos durante el curso.
🟡 En desarrollo
Este repositorio se actualizará conforme aprenda nuevos comandos y conceptos de Git.