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.
π Guidelines for contributing | π§ Changelog | π¨ Troubleshooting
curl -sS https://raw.githubusercontent.com/diogocavilha/fancy-git/master/install.sh | sh
curl -sS https://raw.githubusercontent.com/diogocavilha/fancy-git/master/uninstall.sh | sh
- Change your terminal font to Sauce-Code-Pro-Nerd-Font-Complete-Windows-Compatible.ttf.
It's necessary only if you're using one of the fancy styles for rendering the icons properly.
If you can't find the font, it's still possible to install it manually by runningfancygit --fonts-install
or even installing the ttf file which is placed at~/.fancy-git/fonts/Sauce-Code-Pro-Nerd-Font-Complete-Windows-Compatible.ttf
. - Restart your terminal.
Run fancygit -h
to check FancyGit help.
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 --colors
to see those suggested colors.
Run fancygit --colors-apply
to apply it.
I suggest you to use this scheme color because FancyGit will paint the background branch, most of the time, according to the current repo status, since you're using some of the colored style.
Type fancygit -h
for more information.
As a picture is worth a thousand words...
Working on a Python virtual environment?
If you don't want to be too "fancy", you can choose using the simple style by running fancygit simple
.
If you want to return to the default style (colored), you can type fancygit default
.
There are a few more styles you can choose from.
Here you have a list of available styles and their corresponding command to apply.
fancygit human-dark-single-line
You can type fancygit --separator<TAB>
so you can see all the available separator styles for you to use.
It's highly recommended to set up the terminal font to Sauce-Code-Pro-Nerd-Font-Complete-Windows-Compatible.ttf which comes with FancyGit.
This way, symbols will be rendered correctly and new FancyGit releases must work as expected.
In order to install the font you can run fancygit --fonts-install
.
After that, just change your terminal font config to Sauce-Code-Pro-Nerd-Font-Complete-Windows-Compatible.ttf.
Command | Description |
---|---|
fancygit -h, --help | Show this help. |
fancygit -v, --version | Show the FancyGit version. |
fancygit --update | Update FancyGit code with the latest release from GitHub. |
fancygit --fonts-install | Install font in order to render icons properly. |
fancygit --colors | Show suggested colors config. |
fancygit --colors-apply | Apply the suggested colors config. |
fancygit --disable-full-path | FancyGit will show only the the working directory name. |
fancygit --enable-full-path | FancyGit will show the entire path. |
fancygit --disable-show-user-at-machine | FancyGit will hide (user@machine) info. |
fancygit --enable-show-user-at-machine | FancyGit will show (user@machine) info, as usual. |
fancygit --enable-time | FancyGit will show current time. |
fancygit --disable-time | FancyGit will not show current time. |
fancygit --separator-default | Change the separator to default style. |
fancygit --separator-blocs | Change the separator to blocs style. |
fancygit --separator-blocs-tiny | Change the separator to blocs-tiny style. |
fancygit --separator-curve | Change the separator to curve style. |
fancygit --separator-fire | Change the separator to fire style. |
fancygit --separator-lego | Change the separator to lego style. |
fancygit --separator-paint | Change the separator to paint style. |
fancygit simple | Change prompt to the simple style. |
fancygit simple-double-line | Change prompt to the simple style in double line. |
fancygit default | Change prompt to the default (colored) style. |
fancygit double-line | Change prompt to the default (colored) style in double line. |
fancygit human | Change prompt to the human readable style. |
fancygit human-dark | Change prompt to the human readable style. |
fancygit dark | Change prompt to the dark style. |
fancygit dark-double-line | Change prompt to the dark style in double line. |
fancygit dark-col-double-line | Change prompt to the dark (colored) style in double line. |
fancygit light | Change prompt to the light style. |
fancygit light-double-line | Change prompt to the light style in double line. |
Alias | Description |
---|---|
gs | Show 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> ) |
gaa | Add all files in order to commit. (file) |
gd | Show changes of a file and suggests to add it. (git diff ) (file) |
gcm | Start committing. (git commit) |
gcmm "<message>" | Start committing with a message. (git commit -m "<message>" ) |
gpl | Git pull. (git pull ) (file) |
gps | Git 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> ) |
gplob | Git pull from remote current branch to local current branch. (file) |
gpsob | Git 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) |
gl | Show git log. (git log ) |
glp | Show pretty git log. (file) |
gdof | Remove 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> ) |
gurl | Show git repository URL. (file) |
guser | Show git user information. (file) |
gst | Create new stash with default message. (git stash ) |
gstl | List all stashes. (git stash list ) |
gstm | Create new stash with custom message. (git stash save "<message>" ) |
gstw | Show stash diffs. (git stash show <stash_id> ) (file) |
gsta | Apply stash. (git stash apply <stash_id> ) (file) |
gstd | Drop 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> ) |
pve | Show the current Python virtual environment name. (file) |
If you like to tweak things more in-depth, like color values, special characters and such, you can create a new file ~/.fancy-git/config-override.sh
. This file is sourced after reading the standard configuration, so that you can override any variable found in the main config.sh
.
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 override file and add a line like this (for sure, you will likely have changed the symbol):
branch_icon="ξ "
Thanks goes to these wonderful people (emoji key):
Holger Pandel π» |
Marvin Kweyu π» |
Foundjem π» |
Rafael Martins π» |
OtΓ‘vio Augusto π |
Roger Carhuatocto π |
Rafael Pereira π |
Tom Halliley π΅ |
Sven Finke π€ |
ibury08 π» |
Josip Trupina π» |