Skip to content

Instantly share code, notes, and snippets.

@ctigeek
Created September 28, 2015 17:46
Show Gist options
  • Select an option

  • Save ctigeek/3ebb7f6491b2521ccfea to your computer and use it in GitHub Desktop.

Select an option

Save ctigeek/3ebb7f6491b2521ccfea to your computer and use it in GitHub Desktop.
Compare all the files of the same name in two directories.
Get-ChildItem C:\dir\* | %{
$file1 = "C:\dir\$($_.Name)"
$file2 = "C:\dir\$($_.Name)"
. 'C:\Program Files\TortoiseGit\bin\TortoiseGitMerge.exe' -mine $file1 -base $file2
#it takes a few seconds to open gitmerge. If you don't include this sleep your computer will implode.
Start-Sleep -Seconds 5
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment