Created
March 10, 2012 07:31
-
-
Save antillas21/2010707 to your computer and use it in GitHub Desktop.
Git Un-Workshop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Instalar y Configurar Git | |
Instalar Git | |
Identificándonos | |
$ git config --global user.name "Mi Nombre" | |
$ git config --global user.email "[email protected]" | |
$ ssh-keygen -t rsa -C "[email protected]" | |
Usando Git | |
$ git init | |
$ git add archivo(s) | |
$ git add . | |
$ git commit -m "Mensaje descriptivo de actividades realizadas" | |
$ git status | |
$ git diff [archivo] | |
$ git branch | |
$ git checkout [branch] | |
$ git merge | |
$ git reset --hard hash | |
Revisando el historial | |
$ git log | |
$ git log --pretty=oneline | |
$ git log --pretty=oneline --max-count=7 | |
$ git log --pretty=oneline --since='5 minutes ago' | |
$ git log --pretty=oneline --until='5 minutes ago' | |
$ git log --pretty=format:"%h %ad | %s%d [%an]" --graph --date=short | |
$ git log --graph --pretty=format:'%C(yellow)%h%Creset -%C(green)%d%Creset %s %C(cyan)(%cr) %C(magenta)<%an>%Creset' --abbrev-commit --date=relative | |
Flujo de trabajo | |
Cuidado con operaciones en archivos que son parte del repositorio (mv, rm) | |
$ git mv nombre_anterior [ruta/]nombre_nuevo | |
$ git rm archivo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment