On 14/12/2017 23:27, Igor Djordjevic wrote:
>
> As you basically have a flow where two users (you and cron job) can
> edit same files at the same time, desired outcome might be a bit
> ambiguous, especially when scheduled execution of those files is
> added to the mix.
This said, and without having you to change your habits too much (nor
use Git in possibly awkward ways), I`m thinking you may actually
benefit of using `git worktree add <temp_copy_path>`[1] to create a
temporary working tree ("working copy", as you say), alongside a
temporary branch, where you could hack and test as much as you want,
unaffected by cron job updating and executing the original working
copy/branch (also not stepping on cron job`s toes yourself).
Once you`re satisfied and you commit/merge/push your changes from
within the temporary working copy/branch, you can just delete it
(both temporary working copy and its branch), and you`re good :)
p.s. Even if you`re not familiar with Git branching and merging, it
shouldn`t take too much effort to wrap your head around it, and it`s
definitely worth it - and actually pretty easy, even more if you`re
working alone.
[1] https://git-scm.com/docs/git-worktree