Last active
October 2, 2015 16:58
-
-
Save handersonbf/992075 to your computer and use it in GitHub Desktop.
Comandos GIT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git shortlog -s | sort -rn | nl | |
| Sincronizando master com outro branch. | |
| no branch master, execute: | |
| git rebase outroBranch | |
| Ou para deixar a árvore de commits limpa. | |
| git checkout master | |
| git pull origin master | |
| git merge -squash outroBranch | |
| git commit -a -v && git push origin master | |
| Deletar branch remote | |
| git push origin :nomeBranch | |
| ------------------------------------------------------------------------------------ | |
| Script de shell para deixar os comentários do comando "git log" mais apresentáveis. | |
| no arquivo /home/seu_user/.gitconfig | |
| [alias] | |
| lg = log --graph --pretty=format:'%Cred%h - %Cblue %s %Cgreen(%cr - %cD)%Creset - %an - %ae - %Cred%H' --abbrev-commit --date=relative | |
| depois no console: | |
| [handersonbf] ~/projetos/solr-test (master) | |
| $ git lg | |
| Voce pode criar quantos alias quiser. | |
| ------------------------------------------------------------------------------------ | |
| Comando para configurar o UTF nos commits do Git | |
| git config --global i18n.commitEncoding 'utf8' | |
| git config --global i18n.logOutputEncoding 'utf8' | |
| Garante pelo menos que o que vai pro server quando comitar está apropriado. | |
| ------------------------------------------------------------------------------------------------ | |
| git config --global user.name "Handerson" | |
| git config --global user.email "[email protected]" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment