Skip to content

Instantly share code, notes, and snippets.

@Captnwalker1
Last active January 28, 2025 19:54
Show Gist options
  • Save Captnwalker1/adb994746f9fca68f84952e23027921c to your computer and use it in GitHub Desktop.
Save Captnwalker1/adb994746f9fca68f84952e23027921c to your computer and use it in GitHub Desktop.
Powershell git assume-unchanged for all modified files
foreach ($file in (git status --porcelain | Where-Object { $_ -match '^[ M][M ]' } | ForEach-Object { $_.Substring(3) })) {
git update-index --assume-unchanged $file
Write-Output "Marked $file as unchanged"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment