Giter VIP home page Giter VIP logo

git-standup's Introduction

git-standup

Recall what you did on the last working day ..or be nosy and find what someone else did.

Install

You can install it either using CURL

$ curl -L https://raw.githubusercontent.com/kamranahmedse/git-standup/master/installer.sh | sudo sh

Or install using npm

$ npm install -g git-standup

Or by cloning and manually installing it

$ git clone https://github.com/kamranahmedse/git-standup.git
$ cd git-standup
$ sudo make install

Mac users can install it using brew

$ brew update
$ brew install git-standup

Arch users can find a package in the AUR

$ pacaur -S git-standup-git

Usage

$ git standup [-a <author name>] 
              [-w <weekstart-weekend>] 
              [-m <max-dir-depth>]
              [-f]
              [-L]
              [-d <days-ago>]
              [-D <date-format>] 
              [-g] 
              [-h]

Below is the description for each of the flags

  • -a - Specify author to restrict search to (name or email)
  • -w - Specify weekday range to limit search to (e.g. git standup -w SUN-THU)
  • -m - Specify the depth of recursive directory search
  • -L - Toggle inclusion of symbolic links in recursive directory search
  • -d - Specify the number of days back to include
  • -D - Specify the date format for "git log" (default: relative)
  • -h - Display the help screen
  • -g - Show if commit is GPG signed or not
  • -f - Fetch the latest commits beforehand

For the basic usage, all you have to do is run git standup in a repository or a folder containing multiple repositories

Single Repository Usage

To check all your personal commits from last working day, head to the project repository and run

$ git standup

git standup

Multiple Repository Usage

Open a directory having multiple repositories and run

$ git standup

git standup

This will show you all your commits since the last working day in all the repositories inside.

Directory depth

By default the script searches only in the current directory or one level deep. If you want to increase that, use the -m switch.

$ git standup -m 3

Directory whitelisting

If you want to restrict the standup to some paths, you can whitelist them by adding them to a .git-standup-whitelist file. For example if you have the below directory structure

├── Workspace				# All your projects are here
│   ├── project-a           # Some git repository called project-a
│   ├── project-b           # Some git repository called project-b
│   ├── sketch-files        # Some sketch files
│   ├── mockups		          # Some balsamiq mockups
│   └── ...                 # etc.
└── ...

And you want the git-standup to show logs for only project-a and project-b, you can do that by creating a .git-standup-whitelist file under the Workspace directory with the below contents and it will only consider these directories for the standup

project-a
project-b

Checking someone else's commits

If you want to find out someone else's commits do

# Considering their name on git is "John Doe"
$ git standup -a "John Doe"

git standup

Check what every contributor did

If you want to find out someone else's commits do

$ git standup -a "all"

Commits from n days ago

If you would like to show all your/someone else's commits from n days ago, you can do

# Show all my commits from 4 days ago
$ git standup -d 4

# Show all John Doe's commits from 5 days ago
$ git standup -a "John Doe" -d 5

git standup -d 5

Add -g flag to check the GPG info

$ git standup -g

GPG Info

Specifying the date format

Add -D flag to specify the date format. Default is relative

Please note that it accepts the same format that you could pass while doing git log. For example

$ git standup -D relative
# Or instead of relative, it could be local|default|iso|iso-strict|rfc|short|raw etc

Changing the Weekdays

By default, it considers that the work week starts on Monday and ends on Friday. So if you are running this on any day between Tuesday and Friday, it will show you your commits from the last day. However, if you are running this on Monday, it will show you all your commits since Friday.

If you want to change this, like I want because here in Dubai working days are normally Sunday to Thursday, you will have to do the following

$ git standup -w "SUN-THU"

Fetch commits before showing standup

If you have many repositories that you want to generate a standup for, it may be useful to automatically run git fetch before viewing the standup.

If you would like to automatically run git fetch --all before printing the standup, you can add the -f flag, as show below

$ git standup -f

Mixing options

Of course you can mix the options together but please note that if you provide the number of days, it will override the weekdays configuration (MON-FRI) and will show you the commits specifically from n days ago.

# Show all the John Doe's commits from 5 days ago
$ git standup -a "John Doe" -d 5

Motivation

We have daily standup meetings at our workplace and I was used to checking the heat map on my Github profile or running git log (one by one in each of the projects) to note what I did and it seemed to be a bit cumbersome. To automate it, I searched and came across some of the aliases and snippets that people had been using but none of them directly served my purpose and so I spent a little time over the weekend to write this utility.

License

MIT © Kamran Ahmed

git-standup's People

Contributors

apetro avatar apjanke avatar bitboxer avatar brokenthumbs avatar darrarski avatar golbin avatar havvg avatar ivanstegic avatar kamranahmedse avatar md5 avatar mijoharas avatar nelhage avatar palerdot avatar particleflux avatar ptrf avatar redbeardcreator avatar rootmos avatar sarbbottam avatar simonrw avatar z0rc avatar zackpollard avatar

Watchers

 avatar  avatar

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.