Skip to content

Instantly share code, notes, and snippets.

@yzorg
Created March 31, 2023 13:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yzorg/52fbfcd823d0c3e08f8272532ef60172 to your computer and use it in GitHub Desktop.
Save yzorg/52fbfcd823d0c3e08f8272532ef60172 to your computer and use it in GitHub Desktop.
$fromDir='/code/repo01'; cd $fromDir
$todir='../repo02';
git diff --name-only --cached | %{ cp $_ (join-path $todir $_) -WhatIf } # WhatIf shows what it will do
Read-Host -Prompt 'Press any key to continue or CTRL+C to quit';
git diff --name-only --cached | %{ cp $_ (join-path $todir $_) -v }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment