-1

When copying websites to my server, I noticed that files I had deleted in my local environment were still present on the server after the rsync or scp.

I did some research and found this question which thoroughly explains my problem; though unfortunately only provides a solution for the cp command.
How to force cp to overwrite directory instead of creating another one inside?

How can I use the same functionality of cp -T when copying directories from my local machine to my production server.

note: I understand git push would solve this problem, but I am looking for an alternate solution.

Community
  • 1
  • 1
Palmer
  • 173
  • 9

1 Answers1

1

rsync --delete is the trick.

Thanks to Gordon Davisson and his comment.

Palmer
  • 173
  • 9