Skip to content

Instantly share code, notes, and snippets.

@tranductam2802
Last active December 19, 2019 08:33
Show Gist options
  • Save tranductam2802/4728105717b7e1069a8486ed2d8699e9 to your computer and use it in GitHub Desktop.
Save tranductam2802/4728105717b7e1069a8486ed2d8699e9 to your computer and use it in GitHub Desktop.
Git command memo on gist
# Check the commit rank and list of commiter
$ git config --global alias.rank "shortlog -sn --no-merges"
# Shortern amend
$ git config --global alias.amend "commit --amend --no-edit"
# First 10 commit from all repository
$ git config --global alias.head "log -n 10 --all --graph --oneline --pretty=format:'%Cred%h%Cblue%d%Creset %s %C(bold yellow)<%an> %Cgreen[%cr]%Creset' --abbrev-commit"
# First 10 commit from all repository with detail information
$ git config --global alias.heads "log -n 10 --graph --pretty=format:'%Credコミット: %H [%h]%Cblue%d%n%C(bold yellow)%an <%ae> %Cgreen%cd (%cr)%Creset%n%s' --abbrev-commit"
# Graph log full commit with detail information
$ git config --global alias.lg "log --graph --pretty=format:'%Credコミット: %H [%h]%Cblue%d%n%C(bold yellow)%an <%ae> %Cgreen%cd (%cr)%Creset%n%s' --abbrev-commit"
# Graph log full commit from all repository with detail information
$ git config --global alias.ln "log --all --graph --pretty=format:'%Credコミット: %H [%h]%Cblue%d%n%C(bold yellow)%an <%ae> %Cgreen%cd (%cr)%Creset%n%s' --abbrev-commit"
# Graph log full commit
$ git config --global alias.ls "log --graph --oneline --pretty=format:'%Cred%h%Cblue%d%Creset %s %C(bold yellow)<%an> %Cgreen[%cr]%Creset' --abbrev-commit"
# Graph log full commit from all repository
$ git config --global alias.la "log --all --graph --oneline --pretty=format:'%Cred%h%Cblue%d%Creset %s %C(bold yellow)<%an> %Cgreen[%cr]%Creset' --abbrev-commit"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment