You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Speedily browse your latest local git branches, checkout with Enter. Also view branches unique commits, and optionally the diff against main.
git-recent-2-0-demo.webm
git recent now offers an interactive UI (thx to fzf) for browsing recent branches, seeing differences, and checkout'ing your selection.
See a diff of your branch vs main with ctrl-o. If you have delta it'll use that for formatting, but will fallback, too.
If you're like me, mostly using classic git commands, then git recent provides a nice upgrade for browsing/selecting recent branches. But if you're a TUI fan using git-fuzzy, lazygit or tig or fzf-git, well… this probably isn't an upgrade. :p (But you can certainly read the source quickly!)
Installation
fzf is required for 2.0. TBH, it's a fantastic tool; those shell key bindings are delightful. That said, if you're dependency-averse, the older version below, git recent-og, may be for you.
Mac: brew install fzf
Linux: sudo apt-get install fzf
Windows: choco install fzf
Then, do one of these:
Manual: Grab the git-recent script from this repo and put it anywhere in your $PATH. Run chmod +x git-recent.
Via NPM: npm install --global git-recent
Homebrew: brew install git-recent
Usage
git recent
Hit Enter to checkout the selected branch.
Type or use arrow keys to navigate your list of branches.
Hit ctrl-o to see the branch diff.
git recent-og
git recent-og is the OGgit recent, released back in 2016. Now it's been renamed to git recent-og.
git recent-og
Optionally, add -n<int> to see the most recent <n> branches
git recent-og -n5
If you're a Windows user, you need to use Git Bash or similar shell in order to effectively use this utility.
Installation
Install with npm or brew as above, or copy git-recent-og script into an existing path like /usr/local/bin or ~/bin/.