Giter VIP home page Giter VIP logo

git-smartlog's Introduction

git-smartlog

git-smartlog displays a sparse graph of commits that are relevant to you.

It includes commits like (head, origin/master and any other local branches) while skipping commits that have very little value. For example, in the case of monorepo instances, master can contain hundreds of commits per day, which can make any standard git log very verbose.

Install

Clone the repo to the location of your choice

# Create a symlink to a location that is in your environment path (e.g)
$ ln -s /path-to-cloned-repo/git-smartlog.py ~/bin/git-smartlog

# Add an alias to the global git config
$ git config --global alias.sl smartlog

# Install git dependencies
$ python3 -m pip install gitpython colorama

(Quick explanation on the git alias: By default, whenever you try to run a command git foo, git will search for an executable binary named git-foo)

How it works

Navigate to any folder in the repo you are working on and run

$ git sl

smartlog example

Known limitations

git-smartlog currently does not support merged commits. Where I needed this so far, it was the case of a monorepo with a rebase approach to landing changes to the master branch. Merged commits were rare and adding support was not a necessity. If you need it, feel free to add it and contribute back to the community.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.