Skip to content

Instantly share code, notes, and snippets.

View shashwatblack's full-sized avatar

Shashwat Mehta shashwatblack

View GitHub Profile
@shashwatblack
shashwatblack / git-fuzzy-co.py
Created October 14, 2016 05:02
Git fuzzy checkout with substring matching and case-insensitivity (and colors!)
#!/usr/bin/env python
"""
git fuzzy-checkout
Same as `git checkout branch`, but with fuzzy matching if checkout fails.
Turns `git checkout barnch` into `git checkout branch`,
assuming `branch` is a branch.
"""
import difflib