All Projects → diogocavilha → Fancy Git

diogocavilha / Fancy Git

Licence: gpl-2.0
That's a simple prompt changer to show a few cool git informations about your repository on terminal. You can choose among 13 styles and enjoy all the aliases it provides you. Feel free for contributing, pull requests and issues are always welcome! ;)

Programming Languages

shell
77523 projects
bash
514 projects

Projects that are alternatives of or similar to Fancy Git

Trueline
Fast and extensible bash powerline prompt with true color and fancy icon support
Stars: ✭ 271 (+120.33%)
Mutual labels:  terminal, prompt
Go Prompt
Building powerful interactive prompts in Go, inspired by python-prompt-toolkit.
Stars: ✭ 4,255 (+3359.35%)
Mutual labels:  terminal, prompt
Spaceship Prompt
🚀⭐ A Zsh prompt for Astronauts
Stars: ✭ 15,748 (+12703.25%)
Mutual labels:  terminal, prompt
Pure
Pretty, minimal and fast ZSH prompt
Stars: ✭ 10,891 (+8754.47%)
Mutual labels:  terminal, prompt
Dotfiles
Configurations for the tools I use every day
Stars: ✭ 898 (+630.08%)
Mutual labels:  terminal, prompt
Typewritten
A minimal, lightweight, informative zsh prompt theme
Stars: ✭ 442 (+259.35%)
Mutual labels:  terminal, prompt
Consola
Elegant Console Logger for Node.js and Browser 🐨
Stars: ✭ 3,461 (+2713.82%)
Mutual labels:  terminal, fancy
Termly.js
Simple, Extensible, Hackable and Lightweight Javascript Browser Terminal Simulator!
Stars: ✭ 56 (-54.47%)
Mutual labels:  terminal, prompt
Sultan
Sultan: Command and Rule over your Shell
Stars: ✭ 625 (+408.13%)
Mutual labels:  bash-script, terminal
Termcolor
Termcolor is a header-only C++ library for printing colored messages to the terminal. Written just for fun with a help of the Force.
Stars: ✭ 533 (+333.33%)
Mutual labels:  terminal, fancy
Prompt Checkbox
This repository has been archived, use Enquirer instead.
Stars: ✭ 21 (-82.93%)
Mutual labels:  terminal, prompt
Tty Prompt
A beautiful and powerful interactive command line prompt
Stars: ✭ 1,210 (+883.74%)
Mutual labels:  terminal, prompt
Plexidrive
Scripts to facilitate the use of cloud storage (such as Google Drive) as storage for Plex media server
Stars: ✭ 118 (-4.07%)
Mutual labels:  bash-script
Box Cli Maker
Make Highly Customized Boxes for your CLI
Stars: ✭ 115 (-6.5%)
Mutual labels:  terminal
Xterm.js
A terminal for the web
Stars: ✭ 12,019 (+9671.54%)
Mutual labels:  terminal
Bash Full Of Colors
Advanced .bashrc and .bash_profile coming together with colorful output.
Stars: ✭ 118 (-4.07%)
Mutual labels:  bash-script
Warp
Secure and simple terminal sharing
Stars: ✭ 1,548 (+1158.54%)
Mutual labels:  terminal
Mylittledom
High-level DOM-like terminal interface library
Stars: ✭ 116 (-5.69%)
Mutual labels:  terminal
Docat
Host your docs. Simple. Versioned. Fancy.
Stars: ✭ 115 (-6.5%)
Mutual labels:  fancy
Termy
A terminal with autocomplete
Stars: ✭ 112 (-8.94%)
Mutual labels:  terminal

All Contributors

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.

🔖 You can check out the changelog here

Installing

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

Uninstalling

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

After installing

  1. Change your terminal font to "SourceCodePro+Powerline+Awesome+Regular".
    It's necessary only if you're using one of the fancy styles for rendering the icons properly.
  2. Restart your terminal.

If you can't find the font, it's still possible to install it manually by running fancygit configure-fonts or even installing the ttf file which is placed at ~/.fancy-git/fonts/SourceCodePro+Powerline+Awesome+Regular.ttf.

Once the installation have succeeded, you can type fancygit -h to check fancygit help.

Git suggested colors

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-set 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.

Overview

As a picture is worth a thousand words...

001 002 003 004 005 006 007

Working on a Python virtual environment?

python_venv

Styles 🎨

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 simple Simple

fancygit simple-double-line Simple Double Line

fancygit human Human

fancygit human single line Human Single Line

fancygit human-dark Human Dark

fancygit human-dark-single-line Human Dark Single Line

fancygit default Default

fancygit double-line Double Line

fancygit dark Dark

fancygit dark-double-line Dark Double Line

fancygit dark-col-double-line Dark Col Double Line

fancygit light Light

fancygit light-double-line Light Double Line

Commands

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 configure-fonts Install font in order to render icons properly. This font is good if you are using some of these styles: default, double-line, dark, dark-double-line, light, light-double-line.
fancygit --colors Show suggested colors config in an easy way to copy and paste to apply them.
fancygit --colors-set Apply the suggested colors configuration.
fancygit --disable-full-path Fancygit will show only the the directory name you are working on. Not the entire path.
fancygit --enable-full-path Fancygit will show the entire path.
fancygit --disable-show-user-at-machine Fancygit will hide ([email protected]) info.
fancygit --enable-show-user-at-machine Fancygit will show ([email protected]) info, as usual.
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. (This is the fallback 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.

Aliases

Here we got a list of useful aliases you can use when working. They seem to be not that interesting, but believe me, after getting used to them, your productivity will increase considerably when working with git repos. For example, what if you could replace git push origin <branch-name> for gpsob? It's a much smaller command, isn't it? Ok, but what's the meaning of gpsob?

Well, here goes a little explanation:

gps + o + b
gps = git push
o = origin
b = <current-branch-name>... It will get the current branch name.

Basically, most of the fancygit aliases work this way.

Alias Command Description
gs git status Show git status.
ga <file> [<other_file>] Add files in order to commit. file Add a file in order to commit.
gap <file> Add part of a files in order to commit. Add a file in order to commit.
gaa Add all files in order to commit. file Add all files in order to commit.
gd Show changes of a file and suggests to add it. file Clear screen and git diff
gcm git commit Start committing.
gcmm "<message>" git commit -m "<message>" Start committing with a message.
gpl git pull. file Git pull.
gps git push Git push.
gplo <branch-name> git pull origin <branch-name> file Git pull from <branch-name> to current local branch.
gpso <branch-name> git push origin <branch-name> Git push from current local branch to <branch-name>.
gplob Git pull from remote current branch to local current branch. file Git pull from remote branch to local branch.
gpsob Git push from local current branch to remote current branch. file Git push from local branch to remote branch.
gck <file> ... git checkout -- <file> file Rollback file changes.
gckb <branch-name> git checkout <branch-name> Switch to a branch.
gckbt <branch-name> Switch to a branch with --track option. file Switch to a branch with --track option.
gcb <branch-name> git checkout -b <branch-name> Create and switch to the new branch.
gdb <branch-name> git branch -D <branch-name> Delete a local branch.
gdbr <branch-name> git push origin --delete <branch-name> Delete a remote branch.
grb <new-branch-name> Rename a local branch. file Rename current branch (local).
grba <new-branch-name> Rename a branch (local and remote). file Rename current branch (local and remote).
gl git log Show git log.
glp Show pretty git log. file Show pretty git log.
gdof find . -name "*.orig" | xargs rm -rf Remove all .orig files from project.
gfi <file> git update-index --assume-unchanged <file> Force git to ignore a file.
gurl Show git repository URL. file Show git repository URL.
guser Show git user information. file Show git user information.
gst git stash Create new stash with default message.
gstl git stash list List all stashes.
gstm git stash save "<message>" Create new stash with custom message.
gstw git stash show <stash_id> file Show stash diffs.
gsta git stash apply <stash_id> file Apply stash.
gstd git stash drop <stash_id> file Drop specific stash.
gg "<message>" git add --all && git commit -m "<message>" && git push file Add all changes, then commit and push them.
gu <file> [<other_file>] git reset HEAD <file> Remove files from staging area.
pve file Show the current Python virtual environment name.

Advanced tweaking - override values from config.sh

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=""

Troubleshooting ⛏

  • Double line problem and general weird behavior
    System: Linux | MAC OS - reported issue.
    If you have a few more changes in your .bashrc file, be aware that . ~/.fancy-git/prompt.sh must be the last line of it.

  • Problems with Konsole Terminal
    System: Linux (with KDE) - reported issue.
    Maybe you could face an issue related to icons rendering when using Konsole on version 18.12.1.
    An idea here is to update the Konsole to its latest version. So the problem might be solved ;)

  • Problems with grep command
    System: MAC OS - reported issue.
    As you can read there, the solution found is to brew install grep and adding /usr/local/opt/grep/libexec/gnubin to the PATH ahead of /usr/bin.

  • Problems with sed command
    System: MAC OS - reported issue.
    You can follow the steps as you did for grep, but this time, installing gnu-sed by running brew install gnu-sed.

  • Problems upgrading from v6.0.5 to a newest version
    If you've just upgraded it from v6.0.5 to a newest version, you might have seeing an error, because fancygit can't find its configuration file.
    You can fix that just by running fancygit --config-reset. It'll create a default configuration file and reset the fancygit state.

Contributing 🚀

  • Give this project a star =D
  • Fork the project.
  • Create a branch. (git checkout -b your-branch-name or gcb your-branch-name).
  • Make your changes on the branch you've just created.
  • Commit it.
  • Push it.
  • Send your Pull Request.

Contributors ✨

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

💻

If you have any problem on setting up the fancy-git, contact me at [email protected] or simply create an issue here.
I'll be happy to help you.

Buy me a coffee! ☕️

Donate_with_PayPal

Buy me a coffee with Bitcoin:

1AYm311YYXQJLKbm2UG6NDZKBuGVQ316aD

Buy me a coffee with PIX:

[email protected]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].