I'm using Git at work (on Windows 8), but we have a variable in AD called 'HomeDrive', which is annoyingly set to a network drive. Git has decided to install the git bash and other utilities here, which is super annoying. I was wondering if it's possible to go into Git and edit the $HomeDrive and $HomePath variables as to make Git run off the C drive. Also, apologies if this is the wrong site, but I wasn't sure if it was SO or SU
This is the best I can find on a 'setup' file:
@rem Do not use "echo off" to not affect any child calls.
@rem Enable extensions, the `verify other 2>nul` is a trick from the setlocal help
@verify other 2>nul
@setlocal enableDelayedExpansion
@if errorlevel 1 (
@echo Unable to enable delayed expansion. Immediate expansion will be used.
@goto fallback
)
@rem Get the absolute path to the parent 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!mingwbin;!PATH!
@if not exist "!HOME!" @set HOME=!HOMEDRIVE!!HOMEPATH!
#messing about with this does nothing
@if not exist "!HOME!" @set HOME=!USERPROFILE!
@start "gitk" wish.exe "!git_install_root!bingitk" -- %*
@goto end
:fallback
@rem The above script again with immediate expansion, in case delayed expansion
@rem is unavailable.
@for /F "delims=" %%I in ("%~dp0..") do @set git_install_root=%%~fI
@set PATH=%git_install_root%bin;%git_install_root%mingwbin;%PATH%
@if not exist "%HOME%" @set HOME=%HOMEDRIVE%%HOMEPATH%
@if not exist "%HOME%" @set HOME=%USERPROFILE%
@start "gitk" wish.exe "%git_install_root%bingitk" -- %*
:end
@rem End of script
Recent Questions...
ما را در سایت Recent Questions دنبال میکنید
برچسب:
نویسنده: استخدام کار
بازدید: 211
تاريخ: دوشنبه
17 خرداد
1395 ساعت: 17:22