- git revert -m 1
- git reset --hard HEAD~1
- git push -f
- git checkout
- git status
- git tag -n
- git tag -f -m ""
- git merge
- git push
- git remote set-url origin newUrl
- git rm -r --cached .
- git add .
- git commit -m 'Removed all files that are in the .gitignore'
- git push origin master
- cd /$HOME
- nano .gitignore-global
DS_Store
npm-debug.log
- git config --global core.excludesfile $HOME/.gitignore-global
- cd /$HOME
- nano .gitconfig
[alias]
plog = log --color --graph --pretty=format:'...'
- git log
- git plog //Versión resumida
- cd /$HOME
- nano commit-message.txt
# [Add/Fix/Remove/Update/Refactor/Document] [summary]
# Why is it necessary? (Bug fix, feature, improvements?)
-
# How does the change address the issue?
-
- git config --global commit.template $HOME/commit-message.txt
Modifica la historia, sin agregar un nuevo commit. Solo en branches donde hay cambios míos.
-
git checkout -b myfeaturebranch
-
git rebase master // Volver a los cambios del master
-
git push --force-with-lease //Garantizar que solo sean mis cambios los que voy a reemplazar
-
git rebase -i hash // Rebase a partir de ese commit sin incluirlo
-
git rebase --onto A B //Revertir un conjunto de cambios
-
git cherry-pick // Mover conjuntos de cambios a otro branch, altera la historia (WARNING)