Git Bash For Mac

Bash-git is a bash config for your Mac or Linux

Prerequisites

Jan 21, 2019  Coming from a Windows dev environment can make you miss the simple 'Git Bash Here' in Windows Explorer. Here's how you add that functionality to.

  • Unix-based operating system (Mac OS X or Linux)
    • If your system is Mac OS X, you‘d better install Homebrew
  • make sure your system default Shell is Bash shell
  • git and tmux should be installed
  • Must be backup your .bashrc``.profile and .tmux.conf first

Installation

Step 1

Installation git and tmux

on Mac

brew install git && brew install tmux

on Ubuntu

.git-bash-for-mac.sh

sudo apt-get install git && sudo apt-get install tmux

Step 2

git clone https://github.com/cloudsben/bash-git.git .bash-git

Step 3

/bin/bash ./.bash-git/install.sh

Step 4

Edit .gitconfig change your Name and Email

If you need connect your Server or VPS, Edit ./bash-git/bashrc for servers block

Step 5

Restart your Shell and enjoy it !

Tmux key bindings

Git Bash

Changed

tmux default prefix key binding of Ctrl+b changed to Ctrl+

binding of split-window -h key is |

binding of split-window -v key is -

Tmux configuration file

If you want to customize your own tmux configuration file , you can edit this file .tmux.conf

Download Github Client For Windows

Follow me

Why do I want to build this project

I used to love oh-my-zsh before, but it's to huge and sometimes I'm confused. So I build this project.

LICENSE

Bash-git is released under the MIT license.

Did you (finally) migrate from Windows to Mac and the only thing you miss is the lovely Git Bash?You have no idea what the Git Bash is (or Windows for that matters) and yet you really want to improve your Git experience on Mac?

Here it comes the Git Bash for Mac: a nice Terminal customisation that always shows you the branch you are on, powered by a tab-based autocompletion for all of Git’s subcommands, command-line parameters, and remotes and ref names.

Install

Follow these steps:

  1. from the Terminal, run
  1. open Terminal -> Preferences -> Profiles and select the Pro theme;
  2. restart the Terminal and enjoy!

Uninstall

Follow these steps:

Git
  1. from the Terminal, run
Git bash for mac terminal
  1. open Terminal -> Preferences -> Profiles and select the theme you used to have;
  2. restart the Terminal and (un)enjoy!

Customize

You don't like the colors of your new prompt? Open ~/.git-bash-for-mac.sh and start messing up with it!

How To Download Git Bash For Mac

In addition, by simply exporting a couple of variables in ~/.git-bash-for-mac.sh you can make you prompt even more informative:

Git For Windows 10

  • if you set export GIT_PS1_SHOWDIRTYSTATE=1, unstaged (*) and staged (+) changes will be shown next to the branch name;
  • if you set export GIT_PS1_SHOWSTASHSTATE=1 and something is stashed then a '$' will be shown next to the branch name;
  • if you set export GIT_PS1_SHOWUNTRACKEDFILES=1 and there are untracked files then a '%' will be shown next to the branch name.

Git Bash Macros

More info and options can be found here.