Last active
June 22, 2021 20:36
-
-
Save guipeixoto/b699bf3d4e84ca8a9ede8c75ef593fcb to your computer and use it in GitHub Desktop.
File configuration 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
[user] | |
email = [email protected] | |
name = Guilherme Peixoto | |
[push] | |
defaul = current | |
[pull] | |
default = current | |
[color "status"] | |
header = normal | |
added = green | |
updated = green | |
changed = yellow | |
untracked = red | |
nobranch = red | |
[alias] | |
cm = commit -m | |
cma = commit -am | |
ch = checkout | |
chm = checkout master | |
chb = checkout -b | |
st = status -sb | |
lg = log --pretty=format:'%Cred%h%Creset %C(bold)%cr%Creset %Cgreen<%an>%Creset %s' --max-count=30 | |
# todos commits que estão no remote/servidor estão na sua máquina | |
incoming = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' ..@{u}) | |
# todos commits que estão na sua máquina e não estão no remote/servidor | |
outgoing = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' @{u}..) | |
# remove o arquivo da stage area | |
unstage = reset HEAD -- | |
# desfazer alterações do arquivo | |
undo = checkout -- | |
# desfazer o último commit, porém manter os arquivos | |
rollback = reset --soft HEAD~1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment