Skip to content

Instantly share code, notes, and snippets.

@artero
Forked from trico/comandos.md
Created August 1, 2011 11:51
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save artero/1118003 to your computer and use it in GitHub Desktop.
Save artero/1118003 to your computer and use it in GitHub Desktop.
Comandos git

##Tanto para nuevas features como para bugfixes o releases:

$ git checkout -b myfeature develop Switched to a new branch "myfeature" $ git checkout develop Switched to branch 'develop' $ git merge --no-ff myfeature Updating ea1b82a..05e9557 (Summary of changes) $ git branch -d myfeature

##Crear tag:

$ git tag -a 1.2.1

##Commit con add de todos los archivos:

$ git commit -a -m 'Mensaje'

##Crear zip del último commit:

$ git archive --format=zip HEAD git diff HEAD^ HEAD --name-only > update.zip

##Crear zip desde un commit en concreto hasta el head:

$ git archive --format=zip HEAD git diff commit_id HEAD --name-only > update.zip

##Crear zip desde un commit en concreto hasta otro:

$ git archive --format=zip HEAD git diff commit_id-origen commit_id-final --name-only > update.zip

##Renombrar una branch:

$ git branch -m old_branch new_branch

##Iniciar server git

git daemon --base-path=d:/wamp/www --export-all --port=9999

##Cuando nos da error que no encuentra un archivo al intentar montar un deploy cambiamos el git diff filter para que nos devuelva todos los archivos menos los eliminados :

git diff HEAD^ HEAD --name-only --diff-filter=ACMRTUXB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment