GIT-REPL(1)
β¨ NAME β¨
okay bestie, gather round β <pink>git-repl</pink> is a git read-eval-print-loop. yes it's literally a git REPL. no cap β¨
πΈ SYNOPSIS πΈ
git-repl
git-repl [command...]
π DESCRIPTION π
It's a git read-eval-print-loop, meaning you get to run git commands without typing 'git' every single time like some kind of peasant. π
Commands can be prefixed with an exclamation mark (!) to be interpreted as a regular shell command. so if you're feeling chaotic, that's your moment π¦
Any arguments to git repl will be taken collectively as the first command to execute in the repl. so it just... jumps straight in. iconic.
Type exit, quit, or q to end the repl session. Ctrl+D and Ctrl+C will also work β no judgment either way, she's flexible. π
π COMMANDS π
<command>β gets interpreted asgit <command>, obviously. that's the whole point of her. β¨!<command>β gets interpreted as<command>, like, not through git. raw shell energy. πlsβ the equivalent ofgit ls-files. short, sweet, slay. πexit|quit|qβ ends the repl session. bye bestie π«Ά
π CONFIGURATION π
Commands entered in a repl session get saved to a history file and are available in future sessions, exactly like a shell or a programming language repl. ngl that part is very good of her. π
By default, the global history file lives at ~/.local/state/git_extras_repl_history.
You can also specify that your projects each have their own independent history file. This file will be saved in .git_repl_history at the top level of the repo, and it will need to be added to the repo or global .gitignore. β οΈ not optional, bestie, or git will be in your mentions forever.
# remove the --global flag to configure only an individual project to have its own history file
git config --global git-extras.repl.use-local-history "true"
You can specify a default command to run when hitting enter:
git config --global git-extras.repl.on-enter-command "git status -sb"
You can configure which character is used at the end of the prompt (default >):
git config --global git-extras.repl.prompt-character "Β±"
You can specify the prefix for the prompt (default git):
git config --global git-extras.repl.prefix ""
You can have the name of the current git repo shown in the prompt (default false):
git config --global git-extras.repl.show-project-name "true"
π EXAMPLES π
okay watch this:
$ git repl
git version 2.34.1
git-extras version 7.3.0
Type 'ls' to ls files below current directory; '!command' to execute any command or just 'subcommand' to execute any git subcommand; 'quit', 'exit', 'q', ^D, or ^C to exit the git repl.
git (master)> ls-files
History.md
Makefile
Readme.md
bin/git-changelog
bin/git-count
bin/git-delete-branch
bin/git-delete-tag
bin/git-ignore
bin/git-release
git (master)> !echo Straight from the shell!
Straight from the shell!
git (master)> quit
the !echo one? ate. π₯
π AUTHOR π
Written by Tj Holowaychuk <tj@vision-media.ca>. Updated by Wyatt S Carpenter to add display of the previous command's exit status, 'q', and the ability to pass in the initial command as arguments. π
β¨
πΈ REPORTING BUGS πΈ
found a bug? spill it here π <https://github.com/tj/git-extras/issues> β she wants to hear all about it, fr fr.
π¦ SEE ALSO π¦
<https://github.com/tj/git-extras> β the mothership π
k byeeee, this was Git Extras' git-repl(1), dated May 2026. go run some git commands without typing 'git' like the main character you are. π«Άβ¨
π¦ where this page comes from
- ubuntu stonking: git-extras 7.5.0-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms