Re: Need help migrating workflow from svn to git.
- From
- Igor Djordjevic <igor.d.djordjevic@gmail.com>
- Date
- Dec 15, 2017, 01:17 UTC
- Message-ID
- <b25a828f-3f0a-7c0e-6722-9521238ce7f3@gmail.com>
- In-Reply-To
- <5eb3fe18-864d-0b04-223e-d9e5cbf2c81e@gmail.com>
On 14/12/2017 23:27, Igor Djordjevic wrote:
Show 5 quoted lines
> > 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