Les dejo una lista de algunos trucos con git, básicos, pero que seguro de interés.
-
Setting up Git
-
Añadiendo archivos a un repositorio
-
Para generar las claves
$ git checkout -b BRANCHNAME
-
Hacer un fork de un reporitorio
-
Hacer un clone de un branch específico
$ git clone -b BRANCHNAME --single-branch git://sub.domain.com/repo.git
Configurar un “remote” de un fork y sincronizar
- Para consultar
$ git remote -v
- Para asociar un upstream
$ git remote add upstream https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git
- Para sincronizar
$ git fetch upstream $ git checkout master $ git merge upstream/master
-
Para hacer push a un remote
-
Para hacer un pull request
-
Github flow en el browser
$ git tag -a v1.4 -m "my version 1.4" $ git tag $ git push origin v1.4 $ git push origin --tags
- Reset a una versión previa
$ git reset --hard commit-id $ git push reponame -f
- Descargar cambios de forma interactiva
git checkout -p
- Incorporar cambios de forma interactiva
git add -p