Skip to content

Instantly share code, notes, and snippets.

@blacknoob20
Forked from Klerith/git-alias.md
Last active April 11, 2024 20:50
Show Gist options
  • Save blacknoob20/a429b76052ed9cc664fbe69f8d2d91ad to your computer and use it in GitHub Desktop.
Save blacknoob20/a429b76052ed9cc664fbe69f8d2d91ad to your computer and use it in GitHub Desktop.
GIT

Comandos GIT

USER

git config --global user.name "<nombre del usuario">

EMAL

git config --global user.mail "<nombre del usuario>"

GIT Log

git config --global alias.lg "log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all"

Status

git config --global alias.s "status --short -b"

Alternativa útil de status

git config --global alias.s "status -sb"

List Stagged

git config --global alias.stg "diff --name-only --cached"

UPSTREAM Branch

git remote add upstream <url repo>

Undo Commit

git reset --soft HEAD^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment