- git config --global user.name "TUNICK"
- git config --global user.email "TUCORREO"
- git config --global alias.s "status"
- git config --global alias.l "log --oneline --decorate --all --graph"
- git config --global -l
- git status (o git s, por lo de alias)
(añadir un archivo o carpeta)
- git add index.html
- git add js/
- git add .
- git add -A
- git add -all
- git commit -m "Mensaje"
- git diff
- git checkout .
- git log
- git reflog
- git reset css/*.scss
- git commit --amend -m "Nuevo mensaje"
- git mv principal.html princ.html
- git rm princ.html
(no recupera los archivos, se posiciona para revisar una modificacion)
- git reset --soft ID
(a diferencia de soft, recupera el archivo y todo lo que tenia anteriormente)
- git reset --hard ID
(saca los cambios del stage sin topar con los commits anteriores)
- git reset --mixed ID
- git reflog (buscar el commit)
- git reset --hard ID
(por si tienes una modificacion ahi y no estas seguride ponerla en la rama principal):
- git branch nueva_funcion
- git branch
- git log --oneline --decorate --all --graph
(magicamente agregamos un archivo y lo queremos enviar a la otra rama )
- git checkout nueva_funcion
- git add .
- git commit -m "Se agrego algo nuevo aqui
- git checkout -b rama_op
(debe tener algun commit agregado para no tener problemas la rama op)
- git checkout master
- git merge rama_op
- git tag -a v.1.0.0 -m "Version inicial"
- git tag -a v.1.0.0 ID -m "Version inicial"
Subirlo a github el tag
- git push --tag
- git pull
o (este segundo entraria como una rama nueva )
- git fetch
- git checkout NOMBRE_RAMA
- git push -u origin NOMBRE_RAMA