Top Related Projects
GIT utilities -- repo summary, repl, changelog population, author commit percentages and more
Git alias commands for faster easier version control
A suite of useful Git commands that aid with scripting or every day command line usage
Recall what you did on the last working day. Psst! or be nosy and find what someone else in your team did ;-)
Most commonly used git tips and tricks.
▁▅▆▃▅ Git quick statistics is a simple and efficient way to access various statistics in git repository.
Quick Overview
Git-recent is a command-line tool that enhances the Git experience by providing a quick and easy way to view recent branches. It displays a list of recently checked-out branches, making it simpler for developers to switch between branches they've been working on recently.
Pros
- Improves workflow efficiency by quickly showing recent branches
- Easy to install and use with minimal setup
- Integrates seamlessly with existing Git commands
- Customizable output format
Cons
- Limited functionality compared to full-featured Git GUIs
- Requires manual installation and setup
- May not be necessary for developers who primarily use a single branch
- Could potentially clutter Git aliases if not managed properly
Getting Started
To install git-recent, follow these steps:
# Clone the repository
git clone https://github.com/paulirish/git-recent.git
# Move to the git-recent directory
cd git-recent
# Make the script executable
chmod +x git-recent
# Add the directory to your PATH or move the script to a directory in your PATH
# For example:
sudo cp git-recent /usr/local/bin/
After installation, you can use the command by typing:
git recent
This will display a list of your recently checked-out branches, sorted by most recent first.
Competitor Comparisons
GIT utilities -- repo summary, repl, changelog population, author commit percentages and more
Pros of git-extras
- Offers a comprehensive suite of Git utilities and commands
- Provides a wider range of functionality beyond recent branch management
- Actively maintained with regular updates and contributions
Cons of git-extras
- Larger installation footprint due to numerous scripts and commands
- May include unnecessary features for users primarily interested in recent branch management
- Steeper learning curve to master all available commands
Code Comparison
git-recent:
git for-each-ref --count=30 --sort=-committerdate refs/heads/ --format='%(refname:short)'
git-extras (git-recent command):
git for-each-ref --sort=-committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))'
Summary
git-extras offers a more comprehensive set of Git utilities, including a similar git-recent
command, but with added formatting. While it provides more functionality, it may be overkill for users solely interested in managing recent branches. git-recent focuses specifically on listing recent branches with a simpler implementation. The choice between the two depends on the user's needs for additional Git utilities versus a lightweight, focused tool.
Git alias commands for faster easier version control
Pros of gitalias
- Offers a comprehensive set of Git aliases, covering a wide range of Git operations
- Provides detailed documentation and explanations for each alias
- Includes customization options and configuration files for easy setup
Cons of gitalias
- May be overwhelming for users who prefer a simpler, more focused set of aliases
- Requires more setup and configuration compared to git-recent
- Some aliases might conflict with existing user-defined aliases or commands
Code Comparison
git-recent:
git for-each-ref --count=30 --sort=-committerdate refs/heads/ --format='%(refname:short)'
gitalias:
git config --global alias.recent "for-each-ref --count=10 --sort=-committerdate refs/heads/ --format='%(refname:short)'"
Both projects aim to provide a "recent branches" functionality, but gitalias offers it as a configurable alias, while git-recent implements it as a standalone script.
Summary
git-recent is a focused tool for listing recent Git branches, while gitalias is a comprehensive collection of Git aliases. git-recent is simpler to use out of the box, but gitalias offers more flexibility and a wider range of Git workflow enhancements. Users who prefer a minimalist approach might lean towards git-recent, while those looking for a more extensive set of Git shortcuts may find gitalias more appealing.
A suite of useful Git commands that aid with scripting or every day command line usage
Pros of git-toolbelt
- Offers a more comprehensive set of Git utilities and commands
- Includes advanced features like
git-restore-mtime
andgit-forest
- Provides better documentation and usage examples
Cons of git-toolbelt
- Larger codebase, potentially more complex to maintain
- May include utilities that some users find unnecessary
- Requires more setup and configuration
Code Comparison
git-recent:
git for-each-ref --count=$count --sort=-committerdate refs/heads/ --format='%(refname:short)|%(committerdate:relative)|%(subject)'
git-toolbelt:
git for-each-ref --sort=-committerdate refs/heads/ --format='%(color:yellow)%(refname:short)%(color:reset)|%(color:green)%(committerdate:relative)%(color:reset)|%(subject)' |
column -ts'|'
Both repositories provide useful Git utilities, but git-toolbelt offers a more extensive set of tools with advanced features. git-recent focuses primarily on displaying recent branches, while git-toolbelt includes a wider range of Git-related functionalities. The code comparison shows that git-toolbelt's implementation of the recent branches feature includes color formatting and better output formatting using the column
command.
Recall what you did on the last working day. Psst! or be nosy and find what someone else in your team did ;-)
Pros of git-standup
- Provides a more detailed output, including commit messages and file changes
- Offers customizable date ranges for viewing commit history
- Supports multiple repositories in a single command
Cons of git-standup
- Requires more setup and configuration compared to git-recent
- May be overwhelming for users who prefer a simpler, more concise output
- Has a steeper learning curve due to its additional features and options
Code Comparison
git-standup:
git standup -d 7 -a "John Doe"
git-recent:
git recent
Key Differences
git-standup focuses on providing a comprehensive view of recent activity across multiple repositories, making it ideal for team leads or managers who need to track progress. It offers more granular control over the output, allowing users to specify date ranges and filter by author.
git-recent, on the other hand, provides a quick and simple way to view recent branches, making it more suitable for individual developers who want to quickly switch between their recent work. It has a simpler interface and requires less configuration, making it easier to use out of the box.
Both tools serve different purposes and can be valuable additions to a developer's toolkit, depending on their specific needs and workflow preferences.
Most commonly used git tips and tricks.
Pros of tips
- Comprehensive collection of Git tips and tricks
- Covers a wide range of Git commands and scenarios
- Regularly updated with new tips and community contributions
Cons of tips
- Lacks a specific focus on recent branch management
- May be overwhelming for beginners due to the large number of tips
- No direct command-line integration
Code comparison
tips:
git log --all --graph --decorate --oneline --simplify-by-decoration
git-recent:
git recent
Summary
tips is a comprehensive repository of Git tips and tricks, covering a wide range of commands and scenarios. It's regularly updated and benefits from community contributions. However, it lacks a specific focus on recent branch management and may be overwhelming for beginners.
git-recent, on the other hand, is a focused tool for managing recent Git branches. It provides a simple command-line interface for quickly viewing and switching between recently used branches. While it's not as comprehensive as tips, it excels in its specific use case.
The code comparison shows that tips provides complex Git commands for advanced usage, while git-recent offers a simplified, custom command for its specific functionality.
▁▅▆▃▅ Git quick statistics is a simple and efficient way to access various statistics in git repository.
Pros of git-quick-stats
- Provides a wide range of detailed Git statistics and analytics
- Offers a menu-driven interface for easy access to various reports
- Includes options for customizing date ranges and output formats
Cons of git-quick-stats
- More complex setup and usage compared to git-recent
- Requires additional dependencies (e.g., AWK, column)
- May be overwhelming for users who only need basic recent branch information
Code comparison
git-quick-stats:
#!/usr/bin/env bash
set -e
_usage() {
echo "Usage: git quick-stats [<option>]"
echo "...more options..."
}
git-recent:
#!/usr/bin/env bash
git for-each-ref \
--count=30 \
--sort=-committerdate \
refs/heads/ \
--format='%(refname:short)'
git-quick-stats offers a more comprehensive set of features for analyzing Git repositories, including detailed statistics on commits, authors, and file changes. It provides a menu-driven interface and customizable options, making it suitable for users who need in-depth repository analysis.
On the other hand, git-recent is a simpler tool focused on displaying recent branches. It has a straightforward implementation and is easier to use for quick branch reference.
The code comparison shows that git-quick-stats has a more complex structure with multiple functions and options, while git-recent consists of a single Git command to list recent branches.
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
git recent
Speedily browse your latest local git branches, checkout
with Enter. Also view branches unique commits, and optionally the diff against main.
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
. Runchmod +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 OG git 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/
.
If you like this you may also be interested in...
git open
- Open the repo website in your browserdiff-so-fancy
- Making the output ofgit diff
so fancy
License
Copyright Paul Irish. Licensed under MIT.
Changelog
- 2025-02 - 2.0 upgrade with fzf integration. 1.0 binary is now available as
git recent-og
. - 2019-06 - Last bugfix for 1.0 landed. Been stable since then.
- 2018-10 - Added count
-n
parameter - 2016-08 - released in standalone repo and published to npm
- 2016-05 - added to paulirish/dotfiles
Top Related Projects
GIT utilities -- repo summary, repl, changelog population, author commit percentages and more
Git alias commands for faster easier version control
A suite of useful Git commands that aid with scripting or every day command line usage
Recall what you did on the last working day. Psst! or be nosy and find what someone else in your team did ;-)
Most commonly used git tips and tricks.
▁▅▆▃▅ Git quick statistics is a simple and efficient way to access various statistics in git repository.
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot