Git workflow

ejemplo sacado de aqui

Obtener un repo

git clone git://github.com/bard/sameplace.git

Crear una rama

git checkout fix_for_foobar

Haciendo commits locales

git commit -a -m 'Join Room Dialog: foobar functionality was broken.  Fixed.'
git push origin fix_foo_foobar

Unificando en master

git checkout master
git pull origin master
git rebase fix_for_foobar

Ahora podemos actualizar

git push origin master

opcionalmente podemos crear un patch

git format-patch origin

Borrar una rama

git push origin :branch 

Volviendo a versiones anteriores

Asi vemos los ultimos cambios y sus ids

 git log

Para mandar ala mierda todos los cambios

git reset --hard SHA1_HASH

Para simplemente ver la version anterior

git checkout SHA1_HASH
git checkout SHA1_HASH algun.archivo otro.archivo

Para volver al presente

git checkout branch
This entry was posted in linux and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>