Skip to content

Instantly share code, notes, and snippets.

View pyohei's full-sized avatar
🏯
I'm in Himeji.

Shohei Mukai pyohei

🏯
I'm in Himeji.
View GitHub Profile
@pyohei
pyohei / gitcd.bat
Created March 26, 2017 11:33 — forked from mattn/gitcd.bat
@echo off
chdir %*
set BRANCH=
for /f "eol=; tokens=1,2 delims== " %%i in ('"git branch 2>NUL"') do if "%%i"=="*" set BRANCH=%%j
if "%BRANCH%" neq "" (
set PROMPT=$P^(%BRANCH%^)$G
) else (
set PROMPT=$P$G
)