Skip to content

Instantly share code, notes, and snippets.

@gabihodoroaga
Created July 1, 2021 10:07
Show Gist options
  • Save gabihodoroaga/16909d12291f85c75da6f71efaeca5b0 to your computer and use it in GitHub Desktop.
Save gabihodoroaga/16909d12291f85c75da6f71efaeca5b0 to your computer and use it in GitHub Desktop.

How to copy modified and new files from one repository to antother

# at source - archive all changes - including new files
git status -s | awk {'print $2'} | COPYFILE_DISABLE=1 tar --exclude tar_file.tar -cvf tar_file.tar -T -

# at destination - update the files
tar -xvf tar_file.tar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment