Rough guide on manually setting up Git on Windows
For both machines I'm doing this on (running Windows 7 and Windows 8) I had already installed Github for Windows. However, since I've been converted to posh-git, I wanted to do an install that would get me away from continuing to use it.
The below is roughly what I did, and may not be completely correct.
- Install the latest version of msysgit (currently 1.8.4).
- Set execution policy (run as administrator).
Set-ExecutionPolicy RemoteSigned
- Install posh-git
(new-object Net.WebClient).DownloadString("http://psget.net/GetPsGet.ps1") | iex
- Possibly open the Powershell profile and add the Git path when Powershell runs.
notepad $profile
- Add to the top of the file:
$env:path += ";" + (Get-Item "Env:ProgramFiles(x86)").Value + "\Git\bin"
- Reload profile:
. $profile
- Thanks to G. Lombard.
- Actually install posh-git.
install-module posh-git
- Reload profile:
. $profile
- Verify/set global config options (user name and email).
git config --global -l
git config --global user.name "Your Name Here"
git config --global user.email "[email protected]"
- Update push behavior:
git config --global push.default simple
- See Warning: push.default is unset; its implicit value is changing in Git 2.0
- Since I'm using Powershell 3.0 (ISE), I decided to remove the 'Dark' color versions of the displayed information:
notepad $profile
- Add the following at the end of the file:
$global:GitPromptSettings.BeforeIndexForegroundColor = [ConsoleColor]::Green
$global:GitPromptSettings.IndexForegroundColor = [ConsoleColor]::Green
$global:GitPromptSettings.WorkingForegroundColor = [ConsoleColor]::Red
$global:GitPromptSettings.UntrackedForegroundColor = [ConsoleColor]::Red- See also Git customizing colors for Windows including posh-git
- This involved running these two commands:
git config --global color.status.changed "magenta normal bold"
git config --global color.status.untracked "magenta normal bold"
- This involved running these two commands:
Todo
http://deanclatworthy.com/2013/01/how-to-avoid-relying-on-github-mirror-your-repository/
http://www.harecoded.com/migrating-github-repo-to-bitbucket-or-similar-services-2275467
Search
Links of Note
Support This Site
If my blog was helpful to you, then please consider visiting my Amazon Wishlist.