Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

6
  • 1
    Wouldn't that miss files whose names start with a dot, such as .htaccess? Commented Sep 16, 2011 at 19:45
  • 8
    A good solution, I would change --exclude='.*' to --exclude='.git*' Commented Oct 12, 2011 at 8:00
  • 19
    --exclude-vcs if you were going to take this tact Commented Nov 7, 2011 at 17:05
  • Can ./FROM/ be a remote repo? Commented Jan 31, 2013 at 2:14
  • 2
    As an FYI, my copy of rsync lists the argument as --cvs-exclude. Additionally, it still copies over .gitattributes and .gitignore Commented Feb 21, 2014 at 14:12