Home

Awesome

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->

All Contributors

<!-- ALL-CONTRIBUTORS-BADGE:END -->

Build PRs Welcome made-with-bash MIT Licence GitHub forks GitHub stars

logo

FancyGit is a tool which works for Linux and MAC OS, that changes the terminal prompt in order to show you a few cool git informations when you're working on a git repo. It'll always keep you informed about the current branch status.

:rocket: Contributing | :monocle_face: Changelog | :hammer: Troubleshooting

:cupid: Installing

curl -sS https://raw.githubusercontent.com/diogocavilha/fancy-git/master/install.sh | sh

:broken_heart: Uninstalling

curl -sS https://raw.githubusercontent.com/diogocavilha/fancy-git/master/uninstall.sh | sh

:heavy_check_mark: After installing

  1. Change the font in your terminal application to one of these fonts:
    • Sauce-Code-Pro-Nerd-Font-Complete-Windows-Compatible.ttf.
    • DejaVu-Sans-Mono-Nerd-Font-Complete.ttf.
    • DejaVu-Sans-Mono-Nerd-Font-Complete-Mono.ttf.
    • JetBrains-Mono-Regular-Nerd-Font-Complete-Mono.ttf.
    • JetBrains-Mono-Medium-Nerd-Font-Complete-Mono.ttf.
      It's necessary for rendering icons/symbols properly.
      If you can't find the font, it's still possible to install it manually by running fancygit --fonts-install or even installing the ttf file which is placed at ~/.fancy-git/fonts/. NB for Windows Terminal only the Sauce Code option above will display git icons correctly.
  2. Restart your terminal.

Run fancygit -h to check FancyGit help.

:nail_care: Git suggested config

git config --global color.ui true
git config --global color.diff.meta "yellow bold"
git config --global color.diff.old "red bold"
git config --global color.diff.new "green bold"
git config --global color.status.added "green bold"
git config --global color.status.changed "yellow"
git config --global color.status.untracked "cyan"

Run fancygit --suggested-global-git-config to see that suggested config.
Run fancygit --suggested-global-git-config-apply to apply it.

I suggest you to use this config because FancyGit will paint the background branch, most of the time, according to the current repo status, since you're using some theme which allows that.

Type fancygit -h for more information.

:eyes: Overview

As a picture is worth a thousand words...

001 002 003 004 005 006 007

Working on a Python virtual environment? python_venv

:art: Themes and color schemes

If you don't want to be too "fancy", you can choose using the simple theme by running fancygit --theme-simple. If you want to return to the default theme, just type fancygit --theme-default. There are a few more themes and color schemes you can choose from.

Type fancygit -h to see all available themes and color schemes on "THEME COMMANDS" and "COLOR SCHEME COMMANDS" sections.

Here you have a list of available themes and their corresponding color schemes.

Screenshot font: JetBrains-Mono-Medium-Nerd-Font-Complete-Mono.ttf

fancygit --theme-default (default color scheme: --color-scheme-default)
Theme default

fancygit --color-scheme-dracula
Color scheme dracula

fancygit --color-scheme-batman
Color scheme batman

fancygit --color-scheme-robin
Color scheme robin

fancygit --color-scheme-superman
Color scheme superman

fancygit --color-scheme-light
Color scheme light

fancygit --color-scheme-neon
Color scheme neon

fancygit --color-scheme-cga
Color scheme cga

fancygit --theme-human (default color scheme: --color-scheme-human)
Theme human

fancygit --theme-simple (default color scheme: --color-scheme-simple)
Theme simple

:link: Separators styles

You can type fancygit --separator<TAB> so you can see all the available separator styles for you to use.

:bangbang: Important :bangbang:

It's highly recommended to set up the terminal font to one of:

This way, symbols will be rendered correctly and new FancyGit releases must work as expected.
In order to install the fonts you can run fancygit --fonts-install.

Screenshot font: Sauce-Code-Pro-Nerd-Font-Complete-Windows-Compatible.ttf

fancygit --separator-default
Separator default

fancygit --separator-blocks
Separator blocks

fancygit --separator-blocks-tiny
Separator blocks-tiny

fancygit --separator-curve
Separator curve

fancygit --separator-fire
Separator fire

fancygit --separator-lego
Separator lego

fancygit --separator-paint
Separator paint

:dizzy: Feature switchers

Feature switchers are special commands to enable/disable features and they work on every theme.
You can enable or disable them by typing fancygit --enable-<feature-name> or fancygit --disable-<feature-name>.
Type fancygit -h to see all available feature switchers on "FEATURE SWITCHER COMMANDS" section.

:toolbox: Commands

CommandDescription
fancygit -h, --helpShow this help.
fancygit -v, --versionShow the FancyGit version.
fancygit --updateUpdate FancyGit code with the latest release from GitHub.
fancygit --fonts-installInstall font in order to render icons properly.
fancygit --suggested-global-git-configShow suggested global git config.
fancygit --suggested-global-git-config-applyApply the suggested global git config.
fancygit --config-listShow FancyGit config.
fancygit --resetReset the configuration as if you have just installed FancyGit.
fancygit --changelog-showShow changelog for the last version.
fancygit --show-themesShow all available themes.
fancygit --show-color-schemesShow available color schemes for current theme.
fancygit --show-color-schemes-allShow all available color schemes.
fancygit --enable-full-pathShow the entire path.
fancygit --disable-full-pathShow only the the working directory name.
fancygit --enable-show-user-at-machineShow (user@machine) info, as usual.
fancygit --disable-show-user-at-machineHide (user@machine) info.
fancygit --enable-timeShow current time.
fancygit --disable-timeHide current time.
fancygit --enable-double-lineShow a double line prompt.
fancygit --disable-double-lineShow a single line prompt.
fancygit --enable-rich-notificationShow notification area with icons.
fancygit --disable-rich-notificationShow notification area with simple symbols.
fancygit --enable-bold-promptShow bold prompt font.
fancygit --disable-bold-promptShow regular prompt font.
fancygit --enable-host-nameShow host name.
fancygit --disable-host-nameHide host name.
fancygit --enable-user-symbolShow user symbol.
fancygit --disable-user-symbolHide user symbol.
fancygit --set-user-name {name}Set the user name.
fancygit --unset-user-nameRestore the user name to default.
fancygit --set-host-name {name}Set the host name.
fancygit --unset-host-nameRestore the host name to default.
fancygit --enable-git-clearClear the terminal as part of some git aliases
fancygit --disable-git-clearDo not clear the terminal with any git aliases
fancygit --separator-defaultChange the separator to default style.
fancygit --separator-blocksChange the separator to blocks style.
fancygit --separator-blocks-tinyChange the separator to blocks-tiny style.
fancygit --separator-fireChange the separator to fire style.
fancygit --separator-legoChange the separator to lego style.
fancygit --separator-curveChange the separator to curve style.
fancygit --separator-paintChange the separator to paint style.
fancygit --theme-<name>Change prompt to the selected theme.
fancygit --color-scheme-<name>Change to the selected color scheme.

:toolbox: Aliases

AliasDescription
gsShow git status. (git status)
ga <file> ...Add a file in order to commit. (file)
gap <file>Add a file in order to commit. (git add -p <file>)
gaaAdd all files in order to commit. (file)
gdShow changes of a file and suggests to add it. (git diff) (file)
gcmStart committing. (git commit)
gcmm "<message>"Start committing with a message. (git commit -m "<message>")
gplGit pull. (git pull) (file)
gpsGit push. (git push)
gplo <branch-name>Git pull from <branch-name> to current local branch. (git pull origin <branch-name>) (file)
gpso <branch-name>Git push from current local branch to <branch-name>. (git push origin <branch-name>)
gplobGit pull from remote current branch to local current branch. (file)
gpsobGit push from local current branch to remote current branch. (file)
gck <file> ...Rollback file changes. (git checkout -- <file>) (file)
gckb <branch-name>Switch to a branch. (git checkout <branch-name>).
gckbt <branch-name>Switch to a branch with --track option. (file)
gcb <branch-name>Create and switch to the new branch. (git checkout -b <branch-name>)
ggdb <branch-name>Delete a local branch. (git branch -D <branch-name>)
gdbr <branch-name>Delete a remote branch. (git push origin --delete <branch-name>)
grb <new-branch-name>Rename a branch (local). (file)
grba <new-branch-name>Rename a branch (local and remote). (file)
glShow git log. (git log)
glpShow pretty git log. (file)
gdofRemove all .orig files from project. (find . -name "*.orig" | xargs rm -rf)
gfi <file>Force git to ignore a file. (git update-index --assume-unchanged <file>)
gurlShow git repository URL. (file)
guserShow git user information. (file)
gstCreate new stash with default message. (git stash)
gstlList all stashes. (git stash list)
gstmCreate new stash with custom message. (git stash save "<message>")
gstwShow stash diffs. (git stash show <stash_id>) (file)
gstaApply stash. (git stash apply <stash_id>) (file)
gstdDrop specific stash. (git stash drop <stash_id>) (file)
gg "<message>"Add all changes, then commit and push them. (git add --all && git commit -m "<message>" && git push) (file)
gu <file> ...Remove files from staging area. (git reset HEAD <file>)
pveShow the current Python virtual environment name. (file)

:gear: Advanced tweaking - override some default config values

If you like to tweak things more in-depth, like special characters and such, you can create environment variables. These variables override any value found in FancyGit default configuration.

Example:
You want to change the branch icon, because you are using a different console font and the icon is on a different character position inside the font. Simply create the correspondent environment variable.
For sure, you will likely have changed the symbol:

# Branch icon.
FANCYGIT_ICON_LOCAL_REMOTE_BRANCH=""

Here you can see a list of available environment variables FancyGit will search and replace:

# Path is a git repository
FANCYGIT_ICON_GIT_REPO

# Only local branch icon.
FANCYGIT_ICON_LOCAL_BRANCH

# Branch icon.
FANCYGIT_ICON_LOCAL_REMOTE_BRANCH

# Merged branch icon.
FANCYGIT_ICON_MERGED_BRANCH

# Staged files.
FANCYGIT_ICON_HAS_STASHES

# Untracked files.
FANCYGIT_ICON_HAS_UNTRACKED_FILES

# Changed files.
FANCYGIT_ICON_HAS_CHANGED_FILES

# Added files.
FANCYGIT_ICON_HAS_ADDED_FILES

# Unpushed commits.
FANCYGIT_ICON_HAS_UNPUSHED_COMMITS

# Path is a python virtual environment
FANCYGIT_ICON_VENV

Contributors ✨

Thanks goes to these wonderful people (emoji key):

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --> <!-- prettier-ignore-start --> <!-- markdownlint-disable --> <table> <tbody> <tr> <td align="center" valign="top" width="14.28%"><a href="https://github.com/pandel"><img src="https://avatars2.githubusercontent.com/u/12460002?v=4?s=100" width="100px;" alt="Holger Pandel"/><br /><sub><b>Holger Pandel</b></sub></a><br /><a href="https://github.com/diogocavilha/fancy-git/commits?author=pandel" title="Code">💻</a></td> <td align="center" valign="top" width="14.28%"><a href="http://marvinkweyu.github.io"><img src="https://avatars3.githubusercontent.com/u/34123914?v=4?s=100" width="100px;" alt="Marvin Kweyu"/><br /><sub><b>Marvin Kweyu</b></sub></a><br /><a href="https://github.com/diogocavilha/fancy-git/commits?author=MarvinKweyu" title="Code">💻</a></td> <td align="center" valign="top" width="14.28%"><a href="http://foundjem.com"><img src="https://avatars2.githubusercontent.com/u/5758553?v=4?s=100" width="100px;" alt="Foundjem"/><br /><sub><b>Foundjem</b></sub></a><br /><a href="https://github.com/diogocavilha/fancy-git/commits?author=foundjem" title="Code">💻</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/ohrafaelmartins"><img src="https://avatars3.githubusercontent.com/u/15790926?v=4?s=100" width="100px;" alt="Rafael Martins"/><br /><sub><b>Rafael Martins</b></sub></a><br /><a href="https://github.com/diogocavilha/fancy-git/commits?author=ohrafaelmartins" title="Code">💻</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/otaavioo"><img src="https://avatars2.githubusercontent.com/u/5620565?v=4?s=100" width="100px;" alt="Otávio Augusto"/><br /><sub><b>Otávio Augusto</b></sub></a><br /><a href="https://github.com/diogocavilha/fancy-git/commits?author=otaavioo" title="Documentation">📖</a></td> <td align="center" valign="top" width="14.28%"><a href="https://holisticsecurity.io"><img src="https://avatars2.githubusercontent.com/u/1067672?v=4?s=100" width="100px;" alt="Roger Carhuatocto"/><br /><sub><b>Roger Carhuatocto</b></sub></a><br /><a href="#userTesting-chilcano" title="User Testing">📓</a></td> <td align="center" valign="top" width="14.28%"><a href="http://rafaelp.com.br"><img src="https://avatars3.githubusercontent.com/u/87631?v=4?s=100" width="100px;" alt="Rafael Pereira"/><br /><sub><b>Rafael Pereira</b></sub></a><br /><a href="#userTesting-bsides" title="User Testing">📓</a></td> </tr> <tr> <td align="center" valign="top" width="14.28%"><a href="https://github.com/jthalliley"><img src="https://avatars2.githubusercontent.com/u/11047539?v=4?s=100" width="100px;" alt="Tom Halliley"/><br /><sub><b>Tom Halliley</b></sub></a><br /><a href="#financial-jthalliley" title="Financial">💵</a></td> <td align="center" valign="top" width="14.28%"><a href="http://svenfinke.com"><img src="https://avatars1.githubusercontent.com/u/564499?v=4?s=100" width="100px;" alt="Sven Finke"/><br /><sub><b>Sven Finke</b></sub></a><br /><a href="#ideas-svenfinke" title="Ideas, Planning, & Feedback">🤔</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/ibury08"><img src="https://avatars3.githubusercontent.com/u/24845508?v=4?s=100" width="100px;" alt="ibury08"/><br /><sub><b>ibury08</b></sub></a><br /><a href="https://github.com/diogocavilha/fancy-git/commits?author=ibury08" title="Code">💻</a></td> <td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/in/josip-trupina-47155ab5/"><img src="https://avatars.githubusercontent.com/u/2964787?v=4?s=100" width="100px;" alt="Josip Trupina"/><br /><sub><b>Josip Trupina</b></sub></a><br /><a href="https://github.com/diogocavilha/fancy-git/commits?author=jtrupina" title="Code">💻</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/dquartino"><img src="https://avatars.githubusercontent.com/u/23630214?v=4?s=100" width="100px;" alt="David Quartino"/><br /><sub><b>David Quartino</b></sub></a><br /><a href="https://github.com/diogocavilha/fancy-git/commits?author=dquartino" title="Code">💻</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/rafaelbdb"><img src="https://avatars.githubusercontent.com/u/3081776?v=4?s=100" width="100px;" alt="Borjovsky"/><br /><sub><b>Borjovsky</b></sub></a><br /><a href="https://github.com/diogocavilha/fancy-git/commits?author=rafaelbdb" title="Code">💻</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/EDIflyer"><img src="https://avatars.githubusercontent.com/u/13610277?v=4?s=100" width="100px;" alt="EDIflyer"/><br /><sub><b>EDIflyer</b></sub></a><br /><a href="https://github.com/diogocavilha/fancy-git/commits?author=EDIflyer" title="Code">💻</a></td> </tr> <tr> <td align="center" valign="top" width="14.28%"><a href="https://github.com/gghgaby"><img src="https://avatars.githubusercontent.com/u/20984473?v=4?s=100" width="100px;" alt="Gaby"/><br /><sub><b>Gaby</b></sub></a><br /><a href="#financial-gghgaby" title="Financial">💵</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/nboehm99"><img src="https://avatars.githubusercontent.com/u/15960192?v=4?s=100" width="100px;" alt="nboehm99"/><br /><sub><b>nboehm99</b></sub></a><br /><a href="https://github.com/diogocavilha/fancy-git/commits?author=nboehm99" title="Code">💻</a></td> <td align="center" valign="top" width="14.28%"><a href="http://jumptuck.com"><img src="https://avatars.githubusercontent.com/u/367685?v=4?s=100" width="100px;" alt="Mike Szczys"/><br /><sub><b>Mike Szczys</b></sub></a><br /><a href="https://github.com/diogocavilha/fancy-git/commits?author=szczys" title="Code">💻</a></td> </tr> </tbody> </table> <!-- markdownlint-restore --> <!-- prettier-ignore-end --> <!-- ALL-CONTRIBUTORS-LIST:END -->

:coffee: Buy me a coffee!

Donate_with_PayPal