Skip to content

Instantly share code, notes, and snippets.

@leotm
Last active August 29, 2015 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leotm/59acb3dd0995e225d654 to your computer and use it in GitHub Desktop.
Save leotm/59acb3dd0995e225d654 to your computer and use it in GitHub Desktop.
GitHub for Windows - amended git-cmd.bat path to open in "Documents\GitHub" folder
@rem Do not use "echo off" to not affect any child calls.
@setlocal
@rem Get the absolute path to the current directory, which is assumed to be the
@rem Git installation root.
@for /F "delims=" %%I in ("%~dp0") do @set git_install_root=%%~fI
@set PATH=%git_install_root%\bin;%git_install_root%\mingw\bin;%git_install_root%\cmd;%PATH%
@if not exist "%HOME%" @set HOME=%USERPROFILE%\Documents\GitHub
@if not exist "%HOME%" @set HOME=%USERPROFILE%
@set PLINK_PROTOCOL=ssh
@if not defined TERM set TERM=msys
@cd /d %HOME%
@start %COMSPEC%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment