https://github.com/osheroff/git-spelunk
git-spelunk, an interactive git history tool
https://github.com/osheroff/git-spelunk
Last synced: 4 months ago
JSON representation
git-spelunk, an interactive git history tool
- Host: GitHub
- URL: https://github.com/osheroff/git-spelunk
- Owner: osheroff
- License: mit
- Created: 2013-11-13T18:05:49.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2023-09-20T13:35:36.000Z (over 1 year ago)
- Last Synced: 2024-10-23T19:25:19.474Z (6 months ago)
- Language: Ruby
- Homepage:
- Size: 168 KB
- Stars: 46
- Watchers: 4
- Forks: 7
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: MIT-LICENSE.txt
Awesome Lists containing this project
- awesome-ruby - git-spelunk - Dig through git blame history. (Git Tools)
README
# git-spelunk
This is git-spelunk, an interactive tool for exploring blame history.
Install with `gem install git_spelunk` (requires Ruby 2+).
## Huh?
`git blame` is a great tool for determining code responsibility. But sometimes when you
fire up git-blame, you'll find yourself in a loop of `git-blame`, `git-show`, and then
`git-blame` again in order to find the true owner of a line of code.
`git-spelunk` is the tool for situations like this, when you want to
skip past syntactic and refactoring commits to find the true owner of a line, or see how
a piece of source code has evolved over time.## Guh?
It's easier to show you.
```
git spelunk lib/git_spelunk/offset.rb
```
You can see we've highlighted line 45. `git-spelunk` here is telling us that this line was introduced
in commit 33465d2. You can also see that all other lines that were involved in 33465d2 are picked out
in green. The output of `git show` is present as well for adding more context to the information.Now we press '['. What we're asking here is "show me the file just before 33465d2" was introduced,
essentially replacing the content of the current screen with `git blame [file] 33465d2~1`.
There's other stuff to do; you can hit "s" to do a `git show` of the commit underneath the cursor, you
can search and page through the file like you would with "less".# License
MIT