Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ If you aren't using any zsh frameworks, or if you're a bash user, do the followi
| `git-unreleased` | Mislav Marohnić's [dotfiles](https://github.com/mislav/dotfiles) | Shows git commits since the last tagged version |
| `git-up` | Ryan Tomayko's [dotfiles](http://github.com/rtomayko/dotfiles) | |
| `git-upstream-sync` | Joe Block <jpb@unixorn.net> | Fetches upstream/yourforkname and rebases into your local fork, then pushes to your origin |
| `git-what-the-hell-just-happened` | Gary Bernhardt's [dotfiles](https://github.com/garybernhardt/dotfiles/blob/master/bin/git-what-the-hell-just-happened) | Show what just happened |
| `git-when-merged` | Michael Haggerty [git-when-merged](https://github.com/mhagger/git-when-merged) | Find when a commit was merged into one or more branches |
| `git-where` | Mislav Marohnić's [dotfiles](https://github.com/mislav/dotfiles) | Shows where a particular commit falls between releases |
| `git-winner` | Garry Dolley [https://github.com/up_the_irons/git-winner](https://github.com/up_the_irons/git-winner) | Shows what authors have made the most commits, both by number of commits and by number of lines changed |
Expand Down
23 changes: 23 additions & 0 deletions bin/git-what-the-hell-just-happened
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
# Originally from Gary Bernhardt's dotfiles
# https://github.com/garybernhardt/dotfiles/blob/master/bin/git-what-the-hell-just-happened

set -e

ref=${1:-"HEAD"}

old=$ref@{1}
new=$ref

log() {
git log --graph --pretty=short -1 $1
}

echo "Old revision:"
log $old
echo
echo "New revision:"
log $new
echo
echo "Changes:"
git diff --stat --summary $new $old