Skip to content

Instantly share code, notes, and snippets.

@hymkor
Last active February 4, 2026 13:18
Show Gist options
  • Select an option

  • Save hymkor/c47cf220427b066b92f4cc3d4e014a37 to your computer and use it in GitHub Desktop.

Select an option

Save hymkor/c47cf220427b066b92f4cc3d4e014a37 to your computer and use it in GitHub Desktop.
if ( -not (Test-Path .jj) ){
jj git init
}
if ( -not (Test-Path .gitattributes) ){
"echo * -text`n" | Out-File -NoNewline -FilePath .gitattributes
jj commit -m "Add .gitattributes as autocrlf=false" .gitattributes
}
foreach ( $i in @("*~","*.o","*.exe","__*","*.zip","dist") ){
if ( -not (Select-String -Quiet -SimpleMatch $i .git\info\exclude )){
"$i`n" | Add-Content -NoNewline .git\info\exclude
}
}
# gist https://gist.github.com/hymkor/c47cf220427b066b92f4cc3d4e014a37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment