amnesia is a shell utility for quickly searching and checking out Git branches using the power of fzf. It streamlines your workflow by making branch navigation fast and interactive.
- 🔍 Fuzzy search for local branches
- 🚀 Fast checkout with a single command
- 📝 Print branch names without switching
- 🖱️ Interactive branch selection
- 🏠 Quickly return to the default branch
-
Install fzf dependency
sudo apt install fzf
-
Clone the repository:
git clone https://github.com/ZaikoXander/amnesia.git
-
Source the script in your shell config:
# For bash: echo 'source /path/to/amnesia/index.sh' >> ~/.bashrc # For zsh: echo 'source /path/to/amnesia/index.sh' >> ~/.zshrc
-
Reload your shell:
source ~/.bashrc # or source ~/.zshrc
| Command | Description |
|---|---|
amn <branch> |
Fuzzy-search and checkout a branch |
amni |
Interactively select and checkout a branch |
amnb <branch> |
Print matching branch name (no checkout) |
amnbi |
Interactively select and print branch name |
amn |
Checkout the default branch (main/master) |
- Checkout a branch by name:
amn feature/login
- Interactively select a branch to checkout:
amni
- Print a matching branch name:
amnb fix/typo
- Interactively print a branch name:
amnbi
- Checkout the default branch:
amn
Contributions are welcome! Please open issues or submit pull requests to improve features, fix bugs, or enhance documentation.
Made with ❤️ by ZaikoXander
