-
Notifications
You must be signed in to change notification settings - Fork 1
/
Init.cmd
27 lines (22 loc) · 990 Bytes
/
Init.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
@echo off
@rem Run after Setup.cmd, or as needed, to set useful aliases and environment variables.
@rem Get the hGit username for use in macros below.
set __GitUserName=%USERNAME%
for /f %%n in ('git config user.name') do set __GitUserName=%%n
@rem Remove spaces in case the user has used a full name instead of GitHub username.
set __GitUserName=%__GitUserName: =%
echo.
echo ==========================================================================
echo Ensuring a good editor in place for Git commits on the command line.
echo ==========================================================================
echo.
git config --global core.editor
if ERRORLEVEL 1 git config --global core.editor "notepad"
echo.
echo ==========================================================================
echo Setting aliases for easier command line experience
echo ==========================================================================
echo.
doskey /macrofile=aliases.txt
doskey /macros
exit /b 0