EthanBrown.GitConfiguration
- A number of "standard" Git config options on Win
    core.autocrlf       true
    core.safecrlf       false
    rebase.autosquash   true
    help.format         html
    push.default        simple
    core.editor         Notepad++
    diff.tool           DiffMerge
    diff.guitool        DiffMerge
    merge.tool          DiffMerge
			
			
This commit is contained in:
		| @@ -0,0 +1,39 @@ | ||||
| <?xml version="1.0"?> | ||||
| <package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||||
|   <metadata> | ||||
|     <id>EthanBrown.GitConfiguration</id> | ||||
|     <title>Git - Development Configuration</title> | ||||
|     <version>0.0.1</version> | ||||
|     <authors>Various</authors> | ||||
|     <owners>Ethan Brown</owners> | ||||
|     <summary>Git configuration for Windows.</summary> | ||||
|     <description>Very simple set of standard Git config on Windows | ||||
|  | ||||
|     core.autocrlf       true | ||||
|     core.safecrlf       false | ||||
|     rebase.autosquash   true | ||||
|     help.format         html | ||||
|     push.default        simple | ||||
|     core.editor         Notepad++ | ||||
|  | ||||
|     diff.tool           DiffMerge | ||||
|     diff.guitool        DiffMerge | ||||
|     merge.tool          DiffMerge | ||||
|   </description> | ||||
|     <projectUrl>http://github.com/Iristyle/ChocolateyPackages/</projectUrl> | ||||
|     <tags>Git</tags> | ||||
|     <!-- Eula is in installer | ||||
|     <licenseUrl></licenseUrl> | ||||
|     --> | ||||
|     <requireLicenseAcceptance>false</requireLicenseAcceptance> | ||||
|     <iconUrl>https://github.com/ferventcoder/chocolateyautomaticpackages/raw/master/git/git.png</iconUrl> | ||||
|     <releaseNotes></releaseNotes> | ||||
|     <dependencies> | ||||
|       <dependency id="git.install" /> | ||||
|       <dependency id="notepadplusplus" /> | ||||
|     </dependencies> | ||||
|   </metadata> | ||||
|   <files> | ||||
|     <file src="tools\**" target="tools" /> | ||||
|   </files> | ||||
| </package> | ||||
							
								
								
									
										51
									
								
								EthanBrown.GitConfiguration/tools/chocolateyInstall.ps1
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										51
									
								
								EthanBrown.GitConfiguration/tools/chocolateyInstall.ps1
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,51 @@ | ||||
| $package = 'EthanBrown.GitConfiguration' | ||||
|  | ||||
| try { | ||||
|   # Set up git diff/merge tool | ||||
|   git config --global mergetool.DiffMerge.cmd '\"C:/Program Files/SourceGear/Common/DiffMerge/sgdm.exe\" --merge --result=\"$MERGED\" \"$LOCAL\" \"$BASE\" \"$REMOTE\" --title1=\"Mine\" --title2=\"Merging to: $MERGED\" --title3=\"Theirs\"' | ||||
|   git config --global mergetool.DiffMerge.trustExitCode true | ||||
|   git config --global difftool.DiffMerge.cmd '\"C:/Program Files/SourceGear/Common/DiffMerge/sgdm.exe\"  \"$LOCAL\" \"$REMOTE\" --title1=\"Previous Version ($LOCAL)\" --title2=\"Current Version ($REMOTE)\"' | ||||
|  | ||||
|   $defaultMerge = git config --get merge.tool | ||||
|   if (!$defaultMerge -or ($defaultMerge -match 'kdiff')) | ||||
|   { | ||||
|     git config --global merge.tool DiffMerge | ||||
|   } | ||||
|   git config --global mergetool.keepBackup false | ||||
|   git config --global mergetool.prompt false | ||||
|  | ||||
|   $defaultDiff = git config --get diff.tool | ||||
|   if (!$defaultDiff -or ($defaultDiff -match 'kdiff')) | ||||
|   { | ||||
|     git config --global diff.tool DiffMerge | ||||
|   } | ||||
|   $defaultDiff = git config --get diff.guitool | ||||
|   if (!$defaultDiff -or ($defaultDiff -match 'kdiff')) | ||||
|   { | ||||
|     git config --global diff.guitool DiffMerge | ||||
|   } | ||||
|   git config --global difftool.prompt false | ||||
|  | ||||
|   $defaultPush = git config --get push.default | ||||
|   if (!$defaultPush) | ||||
|   { | ||||
|     git config --global push.default simple | ||||
|   } | ||||
|  | ||||
|   git config --global core.autocrlf true | ||||
|   git config --global core.safecrlf false | ||||
|   $defaultEditor = git config --get core.editor | ||||
|   if (!$defaultEditor) | ||||
|   { | ||||
|     git config --global core.editor "'C:/Program Files (x86)/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugins" | ||||
|   } | ||||
|  | ||||
|   git config --global pack.packSizeLimit 2g | ||||
|   git config --global help.format html | ||||
|   git config --global rebase.autosquash true | ||||
|  | ||||
|   Write-ChocolateySuccess $package | ||||
| } catch { | ||||
|   Write-ChocolateyFailure $package "$($_.Exception.Message)" | ||||
|   throw | ||||
| } | ||||
| @@ -0,0 +1,9 @@ | ||||
| $package = 'EthanBrown.GitConfiguration' | ||||
|  | ||||
| try { | ||||
|   Write-Host "Manually edit $ENV:USERPROFILE\.gitconfig to revert package changes" | ||||
|   Write-ChocolateySuccess $package | ||||
| } catch { | ||||
|   Write-ChocolateyFailure $package "$($_.Exception.Message)" | ||||
|   throw | ||||
| } | ||||
		Reference in New Issue
	
	Block a user