Page 1 of 1

git pull updates multiple copies of a file

PostPosted: Thu Aug 03, 2023 11:00 pm
by jhkoning
hey there,
i'm looking for a way to update multiple copies of a file (stored in different folders) when a master file is updated via a git pull request.
let's say its example.txt (in the cloned git repo) which is the master file.
the copies of example.txt sit in various other folders /user/one, /user/two etc.
so i'm guessing i monitor the cloned git folder where the example.txt master file is, then i'd have a rule to update the copies of that master file - in those different folders.
does that sound logical & doable?
any pointers or advice?
thanks heaps,
Jason

Re: git pull updates multiple copies of a file

PostPosted: Fri Aug 04, 2023 8:34 am
by Mr_Noodle
Sounds doable. You could filter of off date last modified and do a sync or copy of the file. Give it a shot and report back if you run into any problems.

Re: git pull updates multiple copies of a file

PostPosted: Mon Aug 07, 2023 8:53 pm
by jhkoning
appreciate the response, i'll report back once i have working solution - in case it's of any help to someone else.

ok, actually pretty easy, but i'm a little stuck on the following.

setting up a rule to copy the source txt file is easy, date last modified & full name is are the rules i'm using.
it successfully copies (& replaces the existing copy of that file) in destination folder 1, but then the rule copies that file from destination folder 1 -> destination folder 2 (& on & on until its done them all).
this obviously works, & the latest version of the source file ends up in each of the destination folders - but it doesn't seem like the most elegant solution.

is there a way to copy the source file to multiple locations?

currently there are a bunch of rules that are all the same (except for the destination folder), sitting under do the following to the matched file or folder.

or is this the expected way to go about this?

Re: git pull updates multiple copies of a file

PostPosted: Tue Aug 08, 2023 8:35 am
by Mr_Noodle
It shouldn't really matter since they copies are all identical but if you insist of copying from the source each time, use the Sync action.

Re: git pull updates multiple copies of a file

PostPosted: Thu Aug 10, 2023 8:04 pm
by jhkoning
thank you @mr_noodle - i'm all sorted