0

command rsync has option --delete to delete extraneous files from dest dirs, like:

    rsync --delete /etc /home /usr/local

I have a repository cloned from github and perform the following operations daily

    git fetch upstream # not origin, it's upstream
    git merge upstream/master

After get my repository updated, I only work on one 'hello.md' file everyday

    git add 'hello.md'
    git add commit -m 'updated hello.md by hello on 2018-03-30'

Over time, my repository has multiple files that have already been deleted from the upstream.

Is there an option as --delete in async to remove files that may have existed on local repository but no longer existed on the upstream.

max630
  • 8,762
  • 3
  • 30
  • 55
AbstProcDo
  • 19,953
  • 19
  • 81
  • 138
  • 1
    Maybe this helps https://stackoverflow.com/a/64966/3584153 – StefanR Mar 30 '18 at 06:43
  • 2
    Possible duplicate of [How to remove local (untracked) files from the current Git working tree?](https://stackoverflow.com/questions/61212/how-to-remove-local-untracked-files-from-the-current-git-working-tree) – tripleee Mar 30 '18 at 07:06

0 Answers0