Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.
/ git-bash-config Public archive

Personal configurations, aliases and plugins for git-bash

License

Notifications You must be signed in to change notification settings

Hdoc1509/git-bash-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Archived

I moved my configuration for bash and zsh to my dotfiles repo

git-bash-config

This repository hosts my configuration for git-bash that comes bundled with git-for-windows, so this configuration is only for Windows Systems.

Features

  • Mintty as terminal emulator
  • Enabled symlink
  • Custom prompt themes via oh-my-posh
  • Plugins, aliases and functions from shell-fns

Requirements

Installation

Cloning

Clone this repository into your user-specific configurations folder: $HOME/.config:

git clone --depth 1 https://github.com/Hdoc1509/git-bash-config.git ~/.config/git-bash

Sourcing

  • Source entry file in your ~/.bashrc file:
source ~/.config/git-bash/main.sh
  • Be sure to source ~/.bashrc file from your ~/.bash_profile file:
source ~/.bashrc
  • Then, open cmd and make a simlink for the ~/.minttyrc file:
mklink %userprofile%\.minttyrc %userprofile%\.config\git-bash\.minttyrc

Built-in aliases

Alias Description
gbCf Change directory to ~/.config/git-bash and open editor setted in SF_EDITOR variable
gbCfU Update your local copies of git-bash-config and shell-fns. You will need to restart git-bash
srcBash Source your ~/.bashrc file

Customization

All configurations related to prompt-theme and shell-fns plugins must be placed in ~/.config/git-bash/main.sh file.

  • For set an oh-my-posh, theme you should use set_posh_theme or set_custom_theme functions:
# For oh-my-posh built-in themes
set_posh_theme tokyonight_storm

# For oh-my-posh custom themes
set_custom_theme blue-owl-mod

Note: Custom themes have the suffix -mod.

Options for Mintty must be setted in .minttyrc file.

My other software configurations