A useful collection of Git commands Back

  1. List all authors inside a project:

     git shortlog --summary --numbered --email
     git shortlog -sne

    To show all branches:

     git shortlog -sne -all
  2. List logs with a colourful graph:

     git log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%ai) %C(bold blue)<%an>%Creset' --abbrev-commit
  3. Squash all commits into one:

     !f(){ git reset $(git commit-tree HEAD^{tree} -m \"${1:-A new start}\");};f "commmit message"
  4. Show lines of differences between two commits:

     git diff --shortstat
Empty Comments
Sign in GitHub

As the plugin is integrated with a code management system like GitLab or GitHub, you may have to auth with your account before leaving comments around this article.

Notice: This plugin has used Cookie to store your token with an expiration.