yarsync icon indicating copy to clipboard operation
yarsync copied to clipboard

[Feature Request] Untrack unwanted file/dir like `.gitignore`

Open r888800009 opened this issue 2 years ago • 4 comments

Hi, I think it might be a useful feature if .yarsyncignore could be implemented in yarsync.

This can avoid commit and synchronize __pycache__, .DS_Store, some-program.lock, such folders and files

It seems that this feature possible implemented through --exclude-from=

Thank you

r888800009 avatar Nov 10 '23 10:11 r888800009

Hi, Lin (do I write your name correctly?) Please check rsync_filter (special repositories) section in the manual. Does it help with your case? Thank you.

ynikitenko avatar Nov 10 '23 11:11 ynikitenko

In general, it is a bad idea to store programming repositories as unchanged files. Also because yarsync will simply overwrite changes if they happen. So you should not have __pycache__ in your repositories. But yes, I eventually got object files from some C++ codes (which I didn't develop myself, so I stored them simply as files).

ynikitenko avatar Nov 10 '23 12:11 ynikitenko

Thanks for the reply,

.ys/rsync-filter can replace .gitignore and more flexible, it meets the current requirements of my use case.

by the way, according to the manual, using rsync-filter is generally not recommended, and the rsync-filter file will not be synchronized. It seems that this flexibility causes problems.

Not sure if anyone will need to sync rsync-filter, but it may be rare

r888800009 avatar Nov 11 '23 23:11 r888800009

Yes, rsync filter is rather powerful. You can read its manual for the whole picture. I'm not very sure how much it should be "recommended" in yarsync. I also consider synchronising that by default. What is your use case?

ynikitenko avatar Nov 12 '23 00:11 ynikitenko