Skip to content

Instantly share code, notes, and snippets.

@nicolas-t
Forked from n3dst4/ConEmu Git Bash.md
Last active October 26, 2016 13:54
Show Gist options
  • Save nicolas-t/3fd016c7d08268722a27 to your computer and use it in GitHub Desktop.
Save nicolas-t/3fd016c7d08268722a27 to your computer and use it in GitHub Desktop.
  1. Open Conemu

  2. Open Settings -> Tasks or go to new tab button -> Setup tasks.

  3. Click + to add a new task

  4. Enter the name as Git Bash or whatever you like

  5. Task parameters:

     /icon "C:\Program Files (x86)\Git\etc\git.ico" /dir "C:\Users\nicolas"
    
  6. Command:

     "C:\Program Files (x86)\Git\bin\sh.exe" --login -i 
    

If you want to force your $HOME directory to be on local HD not network drive, you can do this as the command instead:

    "set PATH=C:\Users\Ndecarteret;%PATH%" & "set HOME=C:\Users\Ndecarteret" & "C:\Program Files (x86)\Git\bin\sh.exe" --login -i 
@nicolas-t
Copy link
Author

add branch name in vm.

edit bashrc :
vim ~/.bashrc

add alias and branch name coloration :

alias gs='git status'
export PS1='\[\033[01;32m\]\u@\h\[\033[01;34m\] \w\[\033[01;33m\]$(__git_ps1)\[\033[01;34m\] \$\[\033[00m\] '  

execute bashrc:
. ~/.bashrc

@nicolas-t
Copy link
Author

nicolas-t commented Oct 26, 2016

pour cmder,

j'ai installé cmder full avec git-for-windows (directement dans C:) puis

Task parameters:
/icon "C:\Cmder\icons\cmder_blue.ico" /dir "C:\Users\nicolas"

Command:
"C:\Cmder\vendor\git-for-windows\bin\sh.exe" --login -i -new_console:d:C:\Users\nicolas\code\boardbang

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment