(→Diffs y logs) |
(→Remotos) |
||
Línea 57: | Línea 57: | ||
git push --set-upstream origin master | git push --set-upstream origin master | ||
git push -u origin master | git push -u origin master | ||
+ | |||
+ | ===Remotos con tags y branches=== | ||
+ | * Push de todos los branches (locales) y push de todos los tags: | ||
+ | git push --all | ||
+ | git push --tags | ||
+ | |||
+ | * Push de todas las refs (branches, tags y branches remotos): | ||
+ | git push --mirror | ||
+ | |||
+ | * Eliminar una ref en un remoto: | ||
+ | git push --delete nombre_branch | ||
+ | git push :nombre_branch | ||
===Diffs y logs=== | ===Diffs y logs=== |
git config --global user.name "Pipo Perez" git config --global user.email "pperez@servidor.com" # Un mail que se pueda publicar git config --global color.ui auto git config --global core.editor vim
mkdir foobar cd foobar git init
git add archivo git rm archivo
git add archivo
git status git commit -m "Comentario"
===Borrando archivos y enmendando el último commit===
git reset HEAD <archivo>
git checkout -- <archivo>
git commit --amend
git commit --amend --author "Nombre Apellido <napellido@email.com>"
http://git-scm.com/book/en/Git-Basics-Undoing-Things
git remote add origin
git push origin master
git pull origin master
git push --set-upstream origin master git push -u origin master
git push --all git push --tags
git push --mirror
git push --delete nombre_branch git push :nombre_branch
git diff HEAD~1 # Commit padre git diff HEAD~2 # Commit padre del commit padre git diff HEAD^1 # Commit de un padre (para merges) git diff HEAD^2 # Commit de otro padre (para merges)
git log --graph --decorate
git blame archivo
git whatchanged
http://git-scm.com/docs/gitrevisions.html
http://git-scm.com/book/en/Git-Basics-Viewing-the-Commit-History