Created
October 24, 2014 15:50
-
-
Save MattHoneycutt/97342b8f79e1cc378d14 to your computer and use it in GitHub Desktop.
Create a new git repo with a standard .gitignore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$StandardGitIgnoreFile = Resolve-Path ".\std.gitignore" | |
function Git-InitStandard() { | |
git init . | |
Copy-Item $StandardGitIgnoreFile ".\.gitignore" | |
Write-Host "Added standard gitignore file." | |
} | |
<# | |
This assumes you have a file next to your Powershell profile (where this function is defined) named std.gitignore. Here's what's in mine: | |
#ignore thumbnails created by windows | |
Thumbs.db | |
#Ignore files build by Visual Studio | |
*.obj | |
*.exe | |
*.pdb | |
*.user | |
*.aps | |
*.pch | |
*.vspscc | |
*_i.c | |
*_p.c | |
*.ncb | |
*.suo | |
*.tlb | |
*.tlh | |
*.bak | |
*.cache | |
*.ilk | |
*.log | |
[Bb]in | |
[Dd]ebug*/ | |
*.lib | |
*.sbr | |
obj/ | |
[Rr]elease*/ | |
_ReSharper*/ | |
[Tt]est[Rr]esult* | |
packages/**/ | |
#> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment