share two functions for file operations in the background

I’d like to share some functions for file operations in the background.

Smart move file and dirs:

  1. use git mv in a git repo, works well with git (and git-annex)
  2. use rsync for non git controlled files
  3. does not break relative symlinks

Smart copy file and dirs:

  1. use hardlink for files on the same file system
  2. use rsync for files on different file systems
  3. does not break relative symlinks

Here is the link: